Node winston logging | logging in Node

Published: 08 March 2021
on channel: Jan Goebel
44,923
1.1k

🔥More exclusive content: https://productioncoder.com/you-decid...
Twitter:   / _jgoebel  
Blog: https://productioncoder.com
Website: https://jangoebel.com
Code: https://github.com/productioncoder/no...

In this video we cover how to use winston - a Node logging library to create a custom logger. We cover what winston transports are, how to use them and how you should approach logging when running locally and in production. With the winston logging library you have very fine-grained control over how and where logs are written out to. We also cover json logging with winston and how to set your logger up for production use.

00:00 what problem does winston solve?
01:18 winston transports in Node
02:42 log levels in winston
04:17 console.log in detail
05:00 setting up a simple winston logger
08:13 setting the logging level globally
10:04 creating a custom log format in winston
12:05 how to add timestamps to winston logs
15:45 colorizing logger output in winston
16:40 logging stack traces with winston
18:22 adding metadata to winston logs
19:30 creating a production-ready winston logger with json formatting
23:40 dynamically creating your logger depending on the node environment
26:30 trying out our winston production logger
27:56 conclusion


On this page of the site you can watch the video online Node winston logging | logging in Node with a duration of hours minute second in good quality, which was uploaded by the user Jan Goebel 08 March 2021, share the link with friends and acquaintances, this video has already been watched 44,923 times on youtube and it was liked by 1.1 thousand viewers. Enjoy your viewing!