mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-23 04:02:14 -08:00
37 lines
782 B
JavaScript
37 lines
782 B
JavaScript
/**
|
|
* @author Daniel D. Scalzi
|
|
* @license CC-BY-NC 4.0 - https://creativecommons.org/licenses/by-nc/4.0/
|
|
*/
|
|
|
|
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)
|
|
} |