This logger uses Winston under the hood. It is a simple one liner installation to convert plain old console logs to formatted loggin based on the apps packag.json file.
Just include this package once and before everything else:
import 'generate-it-logger';
That is it.
The package will read your API's package json file and use this data to better format the console logs, read this packages index.js file for how.
You can configure this package with env variables (ie a .env file or real env vars).
To use the normal console logger, set either VERBOSE
to true
/TRUE
For example
VERBOSE=TRUE