← Back to issue list

initialization order means early log lines can be lost

View original Github issue

Metadata

Project
charmcraft
Number
#48
Type
issue
State
closed
Author
chipaca
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #174 (commit 624ced3e), which removed the DEBUG environment-variable requirement so verbose mode shows all log messages, including early ones.

Resolution: closed resolved

Reason: PR #174 was merged as cbc2b3df. Its change, 624ced3e, dropped the DEBUG env var because all messages are now shown in verbose mode, resolving the early-log loss.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When running with `--verbose`, everything that is logged before `Dispatcher.run` is never seen by the user. To see them they'd have to also set `DEBUG` in the environ. This feels like a bug to me. Parsing of the command line should be the first thing done, or at least early enough that the debugger doesn't need to change modes after the fact.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #174 (commit 624ced3e), which removed the DEBUG environment-variable requirement so verbose mode shows all log messages, including early ones.
stealth/space-bunny-alpha — closed stale The early-logging initialization bug closed without a fix. A maintainer reopened it in October 2020 to remove the DEBUG flag requirement, but no resolving PR or commit was identified.
stealth/space-bunny-alpha — closed stale Closed without a fix after being reopened to remove the DEBUG environment-variable requirement for early logs; no resolving PR or commit was recorded.
qwen/qwen3.6-35b-a3b — — Closed without a fix after being reopened to remove the DEBUG flag requirement for early logging. The initialization order bug remains unresolved.
qwen/qwen3.6-35b-a3b — — Resolved by removing the DEBUG flag to fix logging initialization order. Early verbose log lines are now captured correctly, and the issue was closed following this fix.
qwen/qwen3.6-35b-a3b — — Closed after reopening to remove the DEBUG flag. Early log lines were lost due to initialization order, prompting maintainers to agree that command-line parsing must precede logging initialization.
qwen3.6-35b-a3b-mtp-q6 — — Closed after being reopened to remove the DEBUG flag workaround for lost early log lines caused by initialization order.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#174 (confidence 99%)

    The merged PR removed the DEBUG env-var workaround and ensured verbose mode displays the messages.

Related issues

No related issues found above the similarity threshold.