Skip to content

Conversation

@feelform
Copy link
Collaborator

@feelform feelform commented Sep 4, 2025

  • Use internal LogLevel constants
  • Appender copy with functions

@feelform feelform force-pushed the log-level branch 2 times, most recently from 9e9d0b4 to ebe8c78 Compare September 4, 2025 13:17
Copy link

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 replaces usage of the external loglevel library constants with internal LogLevel constants in the logging system. The change centralizes log level management by introducing a new LogLevel class with static getters that define the same numeric values as the external library.

Key changes:

  • Introduces a new LogLevel class with static getters for all log levels (TRACE, DEBUG, INFO, WARN, ERROR, SILENT)
  • Updates all files to use the internal LogLevel constants instead of loglevel.levels
  • Re-enables previously skipped tests in the logger test suite

Reviewed Changes

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

Show a summary per file
File Description
lib/utils/log/log-builder.js Adds LogLevel class definition and updates all level references to use internal constants
lib/utils/log/logger.js Replaces loglevel.levels references with internal LogLevel constants
lib/utils/log/index.js Updates exports to use the new LogLevel class
lib/agent-builder.js Renames log import to logger for consistency
test/utils/log/logger.test.js Updates test imports and re-enables skipped tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@feelform feelform changed the title [#367] Use internal LogLevel constants [#367] Use internal LogLevel constants And Appender copy with functions Sep 5, 2025
@feelform feelform changed the title [#367] Use internal LogLevel constants And Appender copy with functions [#367] Use internal LogLevel constants and Appender copy with functions Sep 5, 2025
@feelform feelform changed the title [#367] Use internal LogLevel constants and Appender copy with functions [#367] Allow users to create and add custom Logger Appenders Sep 5, 2025
@feelform feelform linked an issue Sep 5, 2025 that may be closed by this pull request
@feelform feelform added this to the 1.3.0 milestone Sep 5, 2025
@feelform feelform merged commit 14e16d6 into pinpoint-apm:master Sep 5, 2025
3 checks passed
@feelform feelform deleted the log-level branch September 5, 2025 07:03
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.

Allow users to create and add custom Logger Appenders

1 participant