Added support for Streamdeck Pedal and updated UI to better fit the Packed UI style
This commit is contained in:
61
node_modules/cmake-js/lib/cmLog.js
generated
vendored
Normal file
61
node_modules/cmake-js/lib/cmLog.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
'use strict'
|
||||
const log = require('./logger')
|
||||
|
||||
class CMLog {
|
||||
get level() {
|
||||
if (this.options.noLog) {
|
||||
return 'silly'
|
||||
} else {
|
||||
return log.level
|
||||
}
|
||||
}
|
||||
|
||||
constructor(options) {
|
||||
this.options = options || {}
|
||||
this.debug = require('debug')(this.options.logName || 'cmake-js')
|
||||
}
|
||||
silly(cat, msg) {
|
||||
if (this.options.noLog) {
|
||||
this.debug(cat + ': ' + msg)
|
||||
} else {
|
||||
log.silly(cat, msg)
|
||||
}
|
||||
}
|
||||
verbose(cat, msg) {
|
||||
if (this.options.noLog) {
|
||||
this.debug(cat + ': ' + msg)
|
||||
} else {
|
||||
log.verbose(cat, msg)
|
||||
}
|
||||
}
|
||||
info(cat, msg) {
|
||||
if (this.options.noLog) {
|
||||
this.debug(cat + ': ' + msg)
|
||||
} else {
|
||||
log.info(cat, msg)
|
||||
}
|
||||
}
|
||||
warn(cat, msg) {
|
||||
if (this.options.noLog) {
|
||||
this.debug(cat + ': ' + msg)
|
||||
} else {
|
||||
log.warn(cat, msg)
|
||||
}
|
||||
}
|
||||
http(cat, msg) {
|
||||
if (this.options.noLog) {
|
||||
this.debug(cat + ': ' + msg)
|
||||
} else {
|
||||
log.http(cat, msg)
|
||||
}
|
||||
}
|
||||
error(cat, msg) {
|
||||
if (this.options.noLog) {
|
||||
this.debug(cat + ': ' + msg)
|
||||
} else {
|
||||
log.error(cat, msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = CMLog
|
||||
Reference in New Issue
Block a user