Package Exports
- angie-log
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (angie-log) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Angie Log
This is a very slim terminal and outfile logger for iojs/NodeJS ES6 projects. It will work standalone, or as an extension to the Angie MVC.
Usage
npm i -g angie-logimport {default as Log} from 'angie-log';
// Call a new logger with defaults
let log = new Log({
outfile: 'log.log', // defaults to p.cwd() + '/angie.log'
file: 'log.log',
timestamp: true,
level: 'debug', // info, debug, warn, error
silent: false
});
// Output to log.log
log.logger('test');
// $setOutfile to change the output file
log.$setOutfile(`${process.cwd()}/angie.log`);
// $setTimestamp to toggle timestamps in the log output
log.$setTimestamp(true);
// $setLevel to change the log level
log.$setLevel(true);
// $setSilent to prevent terminal output
log.$setSilent(true);
// Explicitly call the prettified terminal output
Log.info('test');
Log.debug('test');
Log.warn('test');
Log.error('test');Angie
Please see the site for news, a quickstart guide, and documentation and the CHANGELOG for an up to date list of changes.
