npm install xtlog --save
const {l, i, w, e} = require('xtlog');
l('This is log: ', 'ab', 123, [4, 5, 6], true, { c: 'de', f: 78 });
i('This is info: ', 'ab', 123, [4, 5, 6], true, { c: 'de', f: 78 });
w('This is warn: ', 'ab', 123, [4, 5, 6], true, { c: 'de', f: 78 });
e('This is error: ', 'ab', 123, [4, 5, 6], true, { c: 'de', f: 78 });
If you want to overide console.log
:
require('xtlog').apply();
Status | Feature | Description |
---|---|---|
☑ | Use l ,i ,w ,e to log |
l ,i ,w ,e alter for console.log/info/warn/error
|
☑ | Make global log style | Apply console.log has same style with xtlog
|
☐ | Log with name file | log to console and display which file is logged |
☐ | Write to file | save file when logging |
☐ | Level log | config level show log |