📜 Fancy Log
Written in TypeScript, compiled down to ES5 for use in any Node.js version!
The package is on the NPM registry as
fancylog. Simply install it with your NPM client of choice.
First, import the module:
// CommonJSconst log =// ES Modules
From there you can call any of the log level functions:
You can also instantiate the
FileLogger class to automatically log to a file as well as the console.
// CommonJSconst FileLogger =// ES Modulesconst log = '/path/to/file.log'log
📝 Example Output
Would result in:
[14/02/2019 09:02:54] [INFO] | hello world[14/02/2019 09:02:54] [DEBUG] | hello world[14/02/2019 09:02:54] [VERBOSE] | hello world