Skip to content
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

Add log scopes #53

Merged
merged 2 commits into from
Mar 13, 2024
Merged

Add log scopes #53

merged 2 commits into from
Mar 13, 2024

Conversation

mrfelton
Copy link
Member

This pull request includes changes primarily focused on improving the logging functionality in the codebase. The main change is the addition of a scope parameter to the logger function, which allows for more specific logging by providing context on where the log is coming from. This scope is now being utilized in several files to provide more detailed logging.

Key changes:

  • src/lib/logger.ts: The logger function now accepts an optional scope parameter. If scope is provided, the logger will return a child logger with the scope included. [1] [2]

  • src/lib/DataProviderManager.ts, src/lib/util.ts, src/providers/bitcoind.ts, src/providers/esplora.ts, src/providers/mempool.ts, src/server.tsx: The logger function is now called with the LOGLEVEL and a scope string that provides context for the logging. This allows for more specific and detailed logging. [1] [2] [3] [4] [5] [6]

@mrfelton mrfelton added the type:enhancement Indicates new feature requests label Mar 13, 2024
@mrfelton mrfelton self-assigned this Mar 13, 2024
@mrfelton mrfelton merged commit ac9b7fb into master Mar 13, 2024
1 check passed
@mrfelton mrfelton deleted the feat/logger-scope branch March 13, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant