hashgraph / guardian

The Guardian is an innovative open-source platform that streamlines the creation, management, and verification of digital environmental assets. It leverages a customizable Policy Workflow Engine and Web3 technology to ensure transparent and fraud-proof operations, making it a key tool for transforming sustainability practices and carbon markets.
Apache License 2.0
93 stars 120 forks source link

Migrate Logging from Winston to Pino #3834

Open Pyatakov opened 6 days ago

Pyatakov commented 6 days ago

Problem description

Our current logging system utilizes winston, which has served us well but has limitations in terms of performance and structured logging capabilities. As our application grows, we need a more efficient and feature-rich logging solution. Pino offers better performance, structured logging out of the box, and is more aligned with our future scalability needs. Additionally, we are currently using Fastify as our web framework, which uses Pino as its default logger. By migrating our application logging to Pino, we can achieve better integration and consistency across our stack, leading to several benefits:

  1. Unified logging: Consistent logging format and methodology across both application and server logs.
  2. Improved performance: Pino is known for its low overhead, which aligns well with Fastify's performance-focused design.
  3. Better integration with Fastify ecosystem: Many Fastify plugins and tools are designed to work seamlessly with Pino logs.
  4. Simplified configuration: We can use a single configuration for both Fastify and our application logging.
  5. Enhanced debugging: With unified logging, it's easier to trace requests through our entire system.

Requirements

Definition of done

Acceptance criteria