Skip to content

Conversation

@goastler
Copy link
Member

  • make getLogger() not accept log level
  • make getLogger accept a url and scope
  • make getLogger strip file url prefix
  • add subScope() to Logger
  • use a clone method to set full logger config in NativeLogger
  • add deepClone defaultData field of NativeLogger
  • add event field to log records
  • fix event handling in log method
  • adjust getLogger() callsites to include scope and url
  • remove auto-shorten url in logger - leave as is
  • lint

Copilot AI review requested due to automatic review settings July 28, 2025 15:29
@goastler goastler self-assigned this Jul 28, 2025
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 updates the getLogger() function API to improve logger configuration and usage patterns. It removes the log level parameter from getLogger() and replaces it with a configuration object that includes scope and URL parameters. The logger now automatically derives its log level from environment variables and provides additional features like sub-scoping.

  • Updated getLogger() API to accept scope and URL instead of log level
  • Added automatic log level configuration from environment variables
  • Added new subScope() method and enhanced logger cloning functionality
  • Updated all callsites across the codebase to use the new API pattern

Reviewed Changes

Copilot reviewed 55 out of 55 changed files in this pull request and generated 4 comments.

File Description
packages/common/src/logger.ts Core logger implementation with new API and functionality
packages/common/package.json Added lodash dependency for deep cloning
Multiple test files Updated getLogger calls to use new object-based API
Multiple source files Updated getLogger calls throughout the codebase

@HughParry HughParry marked this pull request as draft July 29, 2025 09:43
@goastler goastler marked this pull request as ready for review July 29, 2025 13:26
@forgetso forgetso force-pushed the main branch 2 times, most recently from c3bc3c5 to b9f10d3 Compare September 11, 2025 14:22
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