Skip to content

[Bounty: $60] Give InMemoryRuntimeLogger a configurable minimum level matching ConsoleRuntimeLogger #266

Description

@pepkodex56

Context
RuntimeLogger exposes an optional level property, and ConsoleRuntimeLogger honors a minimum level via shouldLog() (see src/logger/runtime-logger.ts). InMemoryRuntimeLogger only supports maxEntries and records every call regardless of severity, so consumers using it as the injected logger for an AgentRuntime (as many tests and harnesses do) cannot filter debug noise from info/error entries.

Proposed Change
Add a level option to InMemoryRuntimeLoggerOptions, store the minimum level, and skip entries below it so the two shipped logger implementations behave consistently.

Acceptance Criteria

  • A unit test constructs new InMemoryRuntimeLogger({ level: "warn" }), logs debug/info/warn/error, and asserts only warn and error entries are recorded.
  • Default construction (no options) still records all levels so existing tests pass unchanged.
  • logger.size() reflects only retained entries after filtering.
  • Behavior is documented on the options interface alongside maxEntries.

Suggested Label
enhancement

ETA: 24 hours

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions