Standard JSON logger for Node services, wraps the Winston library.
yarn add @rafflebox-technologies-inc/rafflebox-logger
To change the logging level set the environment variable. For example:
export LOGGING_LEVEL=debug
By default the NODE_ENV
will output json
log format if the environment is test
or production
. For development
it will output pretty
format.
If you want to output pretty
format you can set the following environment variables:
export LOGGING_FORMAT=pretty
- Clone this repo
yarn
yarn link
- In the package you want to test in run
yarn link @rafflebox-technologies-inc/rafflebox-logger
- Build package with
yarn build
or turn on watch mode withyarn watch
yarn test
yarn build
If you need to clear the build cache run yarn clean