mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-10-31 19:36:39 -07:00
28 lines
577 B
JavaScript
28 lines
577 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])
|
||
|
}
|
||
|
|
||
|
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)
|
||
|
}
|