1.0.3 • Published 3 years ago
dvk-logger v1.0.3
dvk-log
dvk-log is a simple, colored, vanilla console.*, customizable logger, types included!
Installation
Use the package manager npm to install dvk-log.
npm install dvk-log
Usage
import { Logger } from 'dvk-log';
const logger = new Logger({
debugCb: (msg?: string) => {}, //optional callbacks foreach log method
logCb: (msg?: string) => {},
errorCb: (msg?: string) => {},
sucsessCb: (msg?: string) => {},
});
Logger.log('Some usefull data'); // white colored
Logger.debug('goose'); // gray colored
Logger.error('phenomena'); // red colored
Logger.sucsess('Connected'); //green colored
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.