Skip to content

Logging silently broken: RLMLogger import fails in rlm_adapter.py #2

@timothyjlaurent

Description

@timothyjlaurent

Bug

rlm_adapter.py imports RLMLogger incorrectly:

from rlm import RLMLogger  # line 223

But RLMLogger is not exported from rlm.__init__. The correct import is:

from rlm.logger import RLMLogger

Because _maybe_logger() wraps the import in a bare except Exception, the ImportError is silently swallowed and logging never works — not via --log-dir flag nor via output.log_dir in config. No error is shown to the user.

Steps to Reproduce

rlm config set output.log_dir ~/.cache/rlm-cli/logs --local
rlm complete "Hello" --verbose
ls ~/.cache/rlm-cli/logs/
# empty — no log file created

Fix

- from rlm import RLMLogger
+ from rlm.logger import RLMLogger

Impact

  • --log-dir CLI flag has no effect
  • output.log_dir config setting has no effect
  • The visualizer (rlm/visualizer/) is unusable since no traces are generated

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