https://github.com/jangbl/node-winston-logging
demonstrates how to use the winston logging library in Node
https://github.com/jangbl/node-winston-logging
Last synced: 9 months ago
JSON representation
demonstrates how to use the winston logging library in Node
- Host: GitHub
- URL: https://github.com/jangbl/node-winston-logging
- Owner: jangbl
- Created: 2021-02-27T15:08:20.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-05-13T11:01:20.000Z (over 2 years ago)
- Last Synced: 2024-10-03T21:37:57.705Z (over 1 year ago)
- Language: JavaScript
- Size: 1.63 MB
- Stars: 34
- Watchers: 1
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node Logging with winston
This tutorial demonstrates how to use the [winston logging library](https://github.com/winstonjs/winston) to create custom loggers in your Node.js application.
It also demonstrates how to customize transports and what you need to pay attention to when you **prepare your application for production use**.
Please help this repo with a ⭐️ if you find it useful! 😁
This repository is contains the code for the [Node winston logging tutorial on Youtube](https://www.youtube.com/watch?v=A5YiqaQbsyI)
[](https://www.youtube.com/watch?v=A5YiqaQbsyI)
Please also check out my website at [jangoebel.com](https://jangoebel.com)
For updates, please follow [@_jgoebel](https://twitter.com/_jgoebel) on Twitter.
# How to run this application
Run
```
npm install
```
to install all dependencies
To see the output of the development logger run
```
npm run dev
```
The `dev` script automatically sets the `NODE_ENV` environment variable to `development`.
If the `NODE_ENV` environment variable is set to a different value than `development` (or not set at all), the production logger will be used.
To see the output of the production logger, just run
```
node index.js
```