MENU

Fun & Interesting

Winston - Logging in JavaScript & Node.js applications

Better Stack 19,799 lượt xem 1 year ago
Video Not Working? Fix It Now

This video is a deep-dive into the Winston package for logging in JavaScript / Node.js applications.

We cover key features such as log-levels, transports, profiling, error handling, and formatting of log entries. We also look at how to centralize your logs across services using Better Stack.

► RELATED GUIDES
A Complete Guide to Winston Logging in Node.js:
https://betterstack.com/community/guides/logging/how-to-install-setup-and-use-winston-and-morgan-to-log-node-js-applications/

A Complete Guide to Pino Logging in Node.js: https://betterstack.com/community/guides/logging/how-to-install-setup-and-use-pino-to-log-node-js-applications/

11 Best Practices for Logging in Node.js:
https://betterstack.com/community/guides/logging/nodejs-logging-best-practices/

Logging in Node.js: A Comparison of the Top 8 Libraries:
https://betterstack.com/community/guides/logging/best-nodejs-logging-libraries/

► HACKING SCALE NEWSLETTER
https://newsletter.betterstack.com/

► READ MORE
More about Better Stack: https://betterstack.com/
Community pages: https://betterstack.com/community/

► STAY TUNED
GitHub: https://github.com/BetterStackHQ
Twitter: https://twitter.com/betterstackhq
LinkedIn: https://www.linkedin.com/company/betterstack
Instagram: https://www.instagram.com/betterstackhq/
TikTok: https://www.tiktok.com/@betterstack

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
02:07 Installing Winston in Node.js project
02:46 Winston Log Levels
03:35 Creating Winston logger
08:31 Formatting Winston log entries
11:29 Adding Custom entries to Winston log output
13:10 Creating a Child Logger object
15:26 Logging Errors with Winston
16:43 Using multiple loggers in application
22:07 Profiling in Winston
24:57 Log Centralisation with Better Stack

#javascript #nodejs #logging

Comment