1
0
mirror of https://github.com/namooplol/unknow-dmb.git synced 2025-05-02 17:08:07 +00:00
Daniel Scalzi 7851fdbefb
v1.0.0
2018-08-31 12:42:18 -04:00

32 lines
670 B
JavaScript

class LoggerUtil {
constructor(prefix, style){
this.prefix = prefix
this.style = style
}
log(){
console.log.apply(null, [this.prefix, this.style, ...arguments])
}
info(){
console.info.apply(null, [this.prefix, this.style, ...arguments])
}
warn(){
console.warn.apply(null, [this.prefix, this.style, ...arguments])
}
debug(){
console.debug.apply(null, [this.prefix, this.style, ...arguments])
}
error(){
console.error.apply(null, [this.prefix, this.style, ...arguments])
}
}
module.exports = function (prefix, style){
return new LoggerUtil(prefix, style)
}