Structured logging focuses on capturing data in a consistent and machine-readable format.
Unlike traditional text-based logs, structured logs are more straightforward to query and analyse, making extracting insights and debugging issues simpler.
In this post, we'll take a look at an example of how structured logging with Pino.
Pino is a popular and fast Node.js logging library that is designed for high-performance and low-overhead logging. It has many useful features, including support for structured logging, log levels, and log redaction.
Pino logging redaction allows you easily redact sensitive information logs, ensuring applications remain secure and compliant with regulations.
Logging is an essential part of any application, providing insight into the what's happening behind the scenes. However, as your codebase grows, it can be challenging to keep track of all the different log statements and where they're coming from. This is where child loggers come in.
Child loggers are a feature of many of the Node.js logging libraries such as Pino, Bunyan and winston have that allow you to create a new logger that inherits the configuration of its parent logger.
This means you can create child loggers that are pre-configured with specific options, making it easier to log messages without repeating the same configuration over and over again.
In this blog post, we'll take a look at an example of how child loggers can help cut down on repetition in TypeScript and Pino.
Engineers are responsible for designing and building complex systems that are expected to perform optimally under different conditions. However, without a deep understanding of how these systems behave, they risk making assumptions that can result in inefficiencies or even system failures.
In this post, we'll discuss why understanding a system like a doctor helping a patient is essential for engineers and by taking a proactive and data-driven approach, engineers can ensure that their systems are performing optimally and can make informed decisions that result in improved performance and reliability.