Open
Conversation
6d66554 to
0ca5710
Compare
37eecbd to
70760fd
Compare
0ca5710 to
4ad2b5f
Compare
a0132ff to
9a60f23
Compare
4ad2b5f to
9c05fec
Compare
9a60f23 to
eacefe1
Compare
9c05fec to
53f65cb
Compare
53f65cb to
99bbc51
Compare
eacefe1 to
7d5e8e4
Compare
8b30a3c to
202e102
Compare
neSpecc
approved these changes
Feb 17, 2026
There was a problem hiding this comment.
Pull request overview
This PR introduces an environment-agnostic logger abstraction to support the architectural refactoring described in issue #151. The implementation separates core logging functionality from browser-specific implementation details, setting the foundation for a cleaner package structure that will enable code reuse across different JavaScript environments (Node.js, Nuxt, etc.).
Changes:
- Added core logger abstraction (
Loggerinterface,LogType,setLogger(),log()) to @hawk.so/core - Migrated browser-specific logger from
utils/log.tstologger/logger.tsas a factory function - Updated all imports across the codebase to use the new logger from @hawk.so/core
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/logger/logger.ts | Defines environment-agnostic Logger interface, LogType, and global logger singleton with setLogger/log functions |
| packages/core/src/index.ts | Exports Logger, LogType, setLogger, and log from core package |
| packages/javascript/src/logger/logger.ts | Browser-specific logger implementation as factory function createBrowserLogger |
| packages/javascript/src/catcher.ts | Initializes logger in constructor; minor formatting improvements to object destructuring |
| packages/javascript/src/utils/log.ts | Removed old browser-specific logger implementation |
| packages/javascript/src/utils/validation.ts | Updated to import log from @hawk.so/core |
| packages/javascript/src/utils/event.ts | Updated to import log from @hawk.so/core |
| packages/javascript/src/modules/socket.ts | Updated to import log from @hawk.so/core |
| packages/javascript/src/modules/fetchTimer.ts | Updated to import log from @hawk.so/core |
| packages/javascript/src/addons/breadcrumbs.ts | Updated to import log from @hawk.so/core |
| packages/javascript/tests/logger/logger.test.ts | Comprehensive tests for browser logger implementation |
| packages/javascript/tests/breadcrumbs.test.ts | Updated to spy on core log function instead of console.warn |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fb57118 to
77fb17d
Compare
202e102 to
924fa12
Compare
77fb17d to
7c596c5
Compare
f99d5fe to
173d40e
Compare
7c596c5 to
d0c4bff
Compare
1cb3077 to
70d214e
Compare
FeironoX5
approved these changes
Feb 26, 2026
70d214e to
fc05da3
Compare
798f237 to
88436ca
Compare
fc05da3 to
8ad3d96
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related #151
Added env-agnostic
Loggerabstraction.Also added global singleton
loggerInstancewhich could be set viasetLoggerand used vialogmethods.Also added browser-specific logger factory-method
createBrowserLoggerwhich may be used asLogger.