1.13.0 • Published 5 years ago

nhsuk-bunyan-logger v1.13.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

NHSUK Bunyan logger

GitHub Release npm version Greenkeeper badge Build Status Coverage Status Known Vulnerabilities

A little library to ease the sharing of the setup of the bunyan logger.

An instance of a bunyan logger is created via the constructor-api and returned.

Install

  • A specific release version (recommended). e.g via yarn: yarn install git://github.com/nhsuk/bunyan-logger.git#x.x.x
  • The latest version (not recommended). e.g. via npm: npm install nhsuk/bunyan-logger
  • Any of the other ways to install an npm package

Usage

const log = require('nhsuk-bunyan-logger')('LOGGER-NAME');

log.METHOD('message goes here');

Where LOGGER-NAME is the name you want for the logger. Where METHOD is any of the supported Bunyan logger methods. Check out the Bunyan documentation for additional information on the API.

Environment Variables

A number of environment variables are used, as detailed below.

VariableDescriptionDefault
NODE_ENVNode environmentdevelopment
LOG_LEVELNumeric log levelDepends on NODE_ENV

A note on LOG_LEVEL - there are default values set depending on the environment. However, if LOG_LEVEL is set this value will override any defaults there might be.

1.13.0

5 years ago

1.12.1

5 years ago

1.12.0

5 years ago

0.0.1-test

5 years ago

1.11.0

6 years ago

1.10.0

6 years ago

1.9.0

6 years ago

1.8.0

6 years ago

1.7.0

6 years ago

1.6.1

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago