31 lines
515 B
JavaScript
31 lines
515 B
JavaScript
const style = require("./color")
|
|
const info = style.green
|
|
const error = style.red
|
|
const debug = style.cyan
|
|
|
|
|
|
const l = {
|
|
|
|
o : console.log,
|
|
|
|
i : function ( msg ) {
|
|
console.log('%s%s%s', info[0], msg , info[1]);
|
|
},
|
|
|
|
d : function ( msg ) {
|
|
console.log('%s%s%s', debug[0], msg , debug[1]);
|
|
},
|
|
|
|
e : function ( msg ) {
|
|
console.log('%s%s%s', error[0], msg , error[1]);
|
|
},
|
|
}
|
|
|
|
l.show = function () {
|
|
|
|
l.i("info")
|
|
l.d("debug")
|
|
l.e("error")
|
|
}
|
|
|
|
module.exports = l |