deep-seas-logger
v1.0.1
Published
a light wrapper around winston that is configurable via node ENV variables
Downloads
1
Readme
Project Title
The purpose of this project is to provide a wrapper around the incredible winston library that will automatically configure a few things that I find I configure a lot and would rather have come standard in the library, especially configuring Winston's metadata via Environment variables.
Getting Started
- Install the deep-seas-logger via either javascript dependency manager you would like:
yarn add deep-seas-logger
ornpm install deep-seas-logger
- Ensure that you have set the node environment variables associated with this logger:
- APP_NAME
- DOMAIN
- NODE_ENV
- USER_ID
- PLATFORM
- Then import the createLogger function anywhere you would like to use it:
import { createLogger } from '../../index';
- You can now build an instance of the logger by invoking createLogger:
const logger = createLogger()