Skip to content

Feature: Read log level from the environment #413

@santanusinha

Description

@santanusinha

Right now there is no way to set the log level externally at runtime. The feature being detailed here will use the CBM_LOG_LEVEL to set the log level for the system.

Allowed values for CBM_LOG_LEVEL:

  • Numerical: 0-5 as mentioned in log.h
  • Textual (case-insensitive): debug/info/error/warn/none

Invalid values will be silently ignored.

Current:

$ CBM_LOG_LEVEL=none build/c/codebase-memory-mcp
level=info msg=mem.init budget_mb=15859 total_ram_mb=31719

Updated

$ CBM_LOG_LEVEL=warn build/c/codebase-memory-mcp
--No output here --

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions