Skip to content

Structured Logging + verbose / quiet / json #20

@LeeSinLiang

Description

@LeeSinLiang

Structured logging + --verbose/--quiet (optional --json)

Summary
Adopt Python logging across the CLI with consistent levels and user-friendly verbosity flags; optional machine-readable JSON logs.

Scope

  • Default level INFO; --verbose → DEBUG; --quiet → WARN/ERROR only.
  • Optional --json to emit structured logs (one JSON object per line).
  • Replace print calls with logger; keep UX-friendly messages by default.

Tasks

  • Centralize logger setup (single module).
  • Wire flags into all commands.
  • Add docs and examples in README.

Acceptance criteria

  • All codepaths route through logging; flags affect output consistently.
  • No regressions in normal (INFO) UX.

Test plan
Unit test logger config; manual test commitlm generate --verbose shows debug traces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions