1.7.0 • Published 3 months ago

@taglivros/tag-logger v1.7.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

tag-logger

Wrapper for winston logger with some default configuration for TAG.

Usage

  1. Install in your project:
  npm i @taglivros/tag-logger
  1. Import and create a log
const createLogger = require( '@taglivros/tag-logger' )

const logger = createLogger( 'module name', { appName: 'application name (optional)', logLevel: 'info' } )

logger.info('log message') // log message

logger.info('log message with metadata', {someData: 'some metadata here'}) /*
  log message with metadata
  {"someData": 'some metadata here'}
*/

createLogger( moduleName, config )

The createLogger receives two parameters the moduleName and an optional config object.

Configurations:

  • logLevel: Restricts the level of logs to be output. Default is info.
  • appName: Adds the name of your application to the log.

Build and publish

To build the types use:

npm run build-types

Check if the types are correct and commit to the repository.

To publish use the custom pipeline.

1.7.0

3 months ago

1.6.0

3 months ago

1.5.0

3 months ago

1.4.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago