Angie Log
An extremely lightweight logging utility for NodeJS built in ES6
About
Angie Log is designed as an extremely lightweight logging utility for NodeJS which will:
- Prettify the terminal output using the Chalk package
- Provide utilities for printing useful and informative terminal output
- Create asynchronously written, non-blocking log files to maintain said useful and informative output based on well-defined JS log levels
Usage
npm i -g angie-log
If Used Standalone
; // Call a new logger with defaultslet logger = outfile: 'log.log' // Set the outfile file: 'log.log' // Equivalent to `outfile` name: 'test' // Set the name of the logger timestamp: true // Controls whether the logfile output has a timestamp level: 'debug' // Sets a single log level levels: 'info' 'debug' // Sets many available log levels logLevel: 'debug' // Equivalent to `level` logLevels: 'info' 'debug' // Equivalent to `levels` silent: false // Controls whether the log instance should output into the terminal as well err = 'log.log' 'test' true 'error' false; // Call the loggers with the string "test"logger;err; // $setOutfile to change the output filelog; // $setName to change the name of the logger and what is logged in the outfilelog; // $setTimestamp to toggle timestamps in the log outputlog; // $setLevel to change the log levellog; // $setSilent to prevent terminal outputlog; // Explicitly call the prettified terminal outputLog;Log;Log;Log;
If Used in an Angie Application
Include the module in the same fashion as it is above, or wherever called modules are bound:
@Controller { $Log; }
The functions available on the Angie Log module are equivalent in either context.
For a list of Frequently Asked Questions, please see the FAQ and the CHANGELOG for an up to date list of changes. Contributors to this Project are outlined in the CONTRIBUTORS file.
Angie
Please see the site for information about the project, a quickstart guide, and documentation and the CHANGELOG for an up to date list of changes.