providers: capture logs with debug-level logging
Metadata
Current evaluation
Merged PR #3950 (848d7c830), restoring provider logs to debug level so capture_logs_from_instance() saves them to the log file instead of emitting them at trace level.
Resolution: closed resolved
Reason: The approved change was merged as commit 848d7c830, changing provider-captured log messages from trace to debug so the log collector records them.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [X] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
Captured logs were not being saved to the log file because they were emitted as trace-level messages instead of debug-level.
Previously, they were debug level ([see here](https://github.com/snapcore/snapcraft/blob/f6abc2efd7c665a2df9577499bb022491d36cfc9/snapcraft/providers/_logs.py#L50)).
[Reported](https://forum.snapcraft.io/t/call-for-testing-snapcraft-7-2-0/32171/2?u=mr_cal) by @diddledani
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3950 (848d7c830), restoring provider logs to debug level so capture_logs_from_instance() saves them to the log file instead of emitting them at trace level. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3950 (848d7c830), restoring provider logs to debug level so they are captured in the log file instead of emitted at trace level. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for captured logs not saving to the log file. Changed log level from trace to debug to ensure proper capture. Approved and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix that changed captured log emission from trace to debug level, ensuring logs are properly saved to the log file. Resolves a bug where logs were discarded due to incorrect severity levels. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #141 providers: capture logs with debug-level logging | rockcraft | merged | Merged #141 (commit 7a008a32), moving captured provider logs from trace to debug so they are saved in quiet and brief modes. | |
| #3935 providers: refactor `capture_logs_from_instance()` | snapcraft | merged | Merged PR #3935 as d0da7f83f, moving capture_logs_from_instance() to providers.py and adopting craft-providers temporarily_pull_file(). | |
| #77 providers: capture logs from instance | rockcraft | merged | Merged as commit 1fe5b57b: refactored instance log capture to use craft-providers temporarily_pull_file() and moved the method into providers.py. |