Service for logging in nodejs projects
Configurable to log via winston-mongodb to database, via winston to files and/or to console.
- Integrate base console logging
- Integrate base file logging
- Integrate base mongodb logging
- Implement custom configuration
- Write tests
- Write documentation
npm install node-logservice-db-file-console --save
var log = require('node-logservice-db-file-console')(configObject);
// change custom config globally in project
log.reinit(configObject);
// log events
log.logConsole('debug text message', 'debug', '[TEST]', 'client');
log.logConsole('info text message', 'info', '[TEST]', 'client');
log.logConsole('warn text message', 'warn', '[TEST]', 'client');
log.logConsole('error text message', 'error', '[TEST]', 'client');
log.logConsole('exception text message', 'exception', '[TEST]', 'client');
log.debug('debug text message', '[TEST]', 'client');
log.info('info text message', '[TEST]', 'client');
log.warn('warn text message', '[TEST]', 'client');
log.error('error text message', '[TEST]', 'client');
log.exception('exception text message', '[TEST]', 'client');
npm test
Feel free and contribute
- 0.3.4 Updated Readme and Dependencies
- 0.3.3 Updated Readme and Dependencies
- 0.3.0 File logging
- 0.2.0 Console logging
- 0.0.1 Initial release