In this video, we'll build a small API with the Fastify framework in Node.js, and will demonstrate how to integrate our application with the Pino.js log package.
We'll see how to customize the logger and ship logs to different locations using Pino.js transports, including how to ship our logs to Better Stack.
► RELATED GUIDES
A Complete Guide to Pino Logging in Node.js: betterstack.com/community/gui...
A Complete Guide to Winston Logging in Node.js:
betterstack.com/community/gui...
11 Best Practices for Logging in Node.js:
betterstack.com/community/gui...
Logging in Node.js: A Comparison of the Top 8 Libraries:
betterstack.com/community/gui...
► READ MORE
More about Better Stack: betterstack.com/
Community pages: betterstack.com/community/
► STAY TUNED
GitHub: github.com/BetterStackHQ
Twitter: / betterstackhq
LinkedIn: / betterstack
Instagram: / betterstackhq
TikTok: / betterstack
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
02:18 Creating Fastify application
05:15 Installing and setting up nodemon
06:31 Extracting routes to Fastify plugin
08:43 Creating Fastify route with dynamic parameter
11:53 Customising Pino.js logger in Fastify application
13:38 Adding Better Stack Pino transport
18:13 Adding multiple Pino transports
#logging #nodejs #fastify
4 июл 2024