Skip to content

Conversation

@Anmol1696
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds JSON format logging support to the logger package, enabling structured log output for log aggregation tools. The implementation adds a new LOG_FORMAT environment variable that accepts 'pretty' (default) or 'json' values, along with runtime configuration functions.

Changes:

  • Added JSON format logging with structured output including timestamp, level, scope, message, and error fields
  • Exported additional configuration functions (setLogLevel, setShowTimestamp, setLogFormat, setLogScopes) and types (LogLevel, LogFormat)
  • Refactored stream selection to support both pretty and JSON format branches

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
pgpm/logger/src/logger.ts Implements JSON format logging logic with environment variable support and runtime configuration
pgpm/logger/src/index.ts Exports new configuration functions and types for external use

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Anmol1696 and others added 2 commits January 22, 2026 17:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Anmol1696 Anmol1696 merged commit cab7943 into main Jan 22, 2026
50 checks passed
@Anmol1696 Anmol1696 deleted the anmol/logger-format branch January 22, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants