Skip to content

feat: add level filtering to ConsoleRuntimeLogger (Closes #133) - #181

Closed
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-133-level-filtering
Closed

feat: add level filtering to ConsoleRuntimeLogger (Closes #133)#181
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-133-level-filtering

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Adds configurable minimum log level option to ConsoleRuntimeLogger. Messages below the configured threshold are suppressed without code changes, enabling production log verbosity control.

Changes

  • Added LogLevel type (debug | info | warn | error) and priority mapping
  • Added ConsoleRuntimeLoggerOptions interface with optional level field
  • Constructor accepts options; default remains info (backward compatible)
  • info() and error() check minLevel before outputting

Testing

Added 4 tests in tests/logger/level-filtering.test.ts:

  • Default behavior outputs info and error
  • Error-only level suppresses info
  • Debug level outputs everything
  • Suppression correctness verified

All 10 tests pass (4 test files). TypeScript compiles clean.

Closes #133

Add configurable minimum log level option to ConsoleRuntimeLogger.
Messages below the configured threshold are suppressed without code
changes, enabling production log verbosity control.

- Added LogLevel type and LOG_LEVEL_PRIORITY mapping
- Added ConsoleRuntimeLoggerOptions with optional level field
- Default remains 'info' (backward compatible)
- info() and error() check minLevel before outputting

Includes 4 tests verifying default behavior, error-only filtering,
debug-level verbosity, and suppression correctness. Full suite green (10/10).

Closes Lilly-Protocol#133
@rafaio1

rafaio1 commented Aug 26, 2026

Copy link
Copy Markdown
Author

Closing in favor of #208, which includes the same level-filtering fix plus runtime.stopped event and stop() method. Consolidating to avoid duplicate submissions for bounty #133.

@rafaio1 rafaio1 closed this Aug 26, 2026
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.

[Bounty: $45] Add level filtering to ConsoleRuntimeLogger

1 participant