Skip to content

feat: add logPrefix option to SorokitClientConfig - #300

Merged
k-deejah merged 2 commits into
Sorokit:mainfrom
gitGolf:feature/add-logPrefix-option
Jul 29, 2026
Merged

feat: add logPrefix option to SorokitClientConfig#300
k-deejah merged 2 commits into
Sorokit:mainfrom
gitGolf:feature/add-logPrefix-option

Conversation

@gitGolf

@gitGolf gitGolf commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an optional field to that allows consumers to customize the log prefix used by the console logger. This enables distinguishing between multiple client instances (e.g., testnet vs mainnet) in debug logs.

Changes

  • Added to interface
  • Updated to accept an optional parameter
  • Modified to pass the prefix to
  • Updated to pass through to the logger
  • Added tests for custom prefix in logger and client integration

Usage

const client = createSorokitClient({
  network: 'testnet',
  debug: true,
  logPrefix: '[app:testnet]'
});
// Logs will now show [app:testnet] instead of [sorokit]

Test Results

All logger tests pass with the new prefix functionality.

Closes #257

- Add optional logPrefix field to SorokitClientConfig interface
- Update createLogger to accept custom prefix parameter
- Pass prefix through to createConsoleLogger
- Add tests for custom prefix in logger and client integration
- Closes Sorokit#257
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@gitGolf Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Just-Bamford

Copy link
Copy Markdown
Collaborator

@gitGolf welldone, kindly pass the CI tests and resolve the conflict

@k-deejah
k-deejah merged commit 48ec769 into Sorokit:main Jul 29, 2026
2 of 5 checks passed
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.

SorokitLogger Has No logPrefix Option — Multiple Client Instances Cannot Be Distinguished in Debug Logs

4 participants