0.1.0 • Published 6 years ago

winston-lludol v0.1.0

Weekly downloads
21
License
MIT
Repository
github
Last release
6 years ago

winston-lludol

dependencies status dev-dependencies status Build Status Coverage Status npm version

A module with winston preconfigured.

Install

npm install --save winston-lludol

Example

const logger = require('winston-lludol');
// logger is an instance of winston.Logger.

// So you have access to every winston method.
logger.error('example - error');
logger.warn('example - warn');
logger.info('example - info');
logger.verbose('example - verbose');
logger.debug('example - debug');
logger.silly('example - silly');

logger.info('[category] example');
logger.debug('example with meta', {foo: 'bar'});

// You can also edit the configuration.
logger.level = 'debug';

// You can access to the winston Object inside the logger instance.
logger.add(logger.winston.transports.File, { filename: 'file.log' });
logger.silly('Test log file');

Screenshot

Alt text

More information

The default transport is a custom winston.transports.Console.

Levels and colors available (default value from winston.config.npm):

{
  error: 'red',
  warn: 'yellow',
  info: 'green',
  verbose: 'cyan',
  debug: 'blue',
  silly: 'magenta'
}

The winston documentaiton.

License

MIT

0.1.0

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

8 years ago

0.0.1

8 years ago