Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Replace console usage with pino logger and add strict console restrictions #90

@galligan

Description

@galligan

Problem

Currently, we're using console directly for logging with broad biome-ignore comments. This isn't ideal for production code where we need structured logging, better performance, and proper log levels.

Solution

Migrate to pino logger for application logging while keeping console usage strictly limited to the ConsoleLogger implementation with tightly scoped ignores.

Tasks

  • Install pino and pino-pretty dependencies
  • Create PinoLogger implementation of Logger interface
  • Update biome.json to enforce no console usage globally (with specific exceptions)
  • Add tightly scoped biome-ignore comments only where console is legitimately needed
  • Add comprehensive tests for both ConsoleLogger and PinoLogger
  • Update default logger in main orchestration to use PinoLogger
  • Ensure backward compatibility with existing Logger interface

Benefits

  • Structured logging: JSON output for production monitoring
  • Performance: Pino is one of the fastest Node.js loggers
  • Developer experience: Pretty formatting in development
  • Production ready: Integration with monitoring tools
  • Type safety: Proper TypeScript types and interfaces

Implementation Notes

  • ConsoleLogger remains for testing/simple cases
  • PinoLogger becomes the recommended production logger
  • Both implement the same Logger interface for compatibility
  • Environment-based configuration via RULESETS_LOG_LEVEL

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions