-
Notifications
You must be signed in to change notification settings - Fork 7
feat/better logger #2041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat/better logger #2041
Conversation
goastler
commented
Jul 28, 2025
- 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
There was a problem hiding this 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 |
packages/provider/src/api/admin/apiRemoveDetectorKeyEndpoint.ts
Outdated
Show resolved
Hide resolved
c3bc3c5 to
b9f10d3
Compare
53f26cf to
91e378f
Compare