Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds "bootstrap logger" for logging before CLI options are recognized #1839

Merged
merged 2 commits into from
Mar 5, 2023

Conversation

happz
Copy link
Collaborator

@happz happz commented Feb 8, 2023

Aims at parts of tmt lifetime where logging is needed, but CLI options like --debug are unknown yet. This would be code that's executed in import time, the most visible one is plugin explocation & importing, but there may be other. At this moment, fmf.utils.Logging is used for this purpose, but that's tmt's logging "sneaking" away from what tmt.log offers and implements. And that's not good, as it may mean slightly different logging behavior than the one exhibited during the rest of tmt run.

Part of the effort behind #1838 and #216.

@happz happz added the code | logging Changes related to debug logging label Feb 8, 2023
@thrix thrix self-requested a review February 8, 2023 11:48
tmt/log.py Show resolved Hide resolved
@happz happz added this to the 1.23 milestone Feb 22, 2023
@thrix thrix self-requested a review March 2, 2023 12:24
Copy link
Collaborator

@thrix thrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thrix thrix requested a review from janhavlin March 2, 2023 12:25
@thrix thrix enabled auto-merge (squash) March 2, 2023 12:29
@thrix thrix modified the milestones: 1.23, 1.22 Mar 2, 2023
Aims at parts of tmt lifetime where logging is needed, but CLI options
like --debug are unknown yet. This would be code that's executed in
import time, the most visible one is plugin explocation & importing, but
there may be other. At this moment, `fmf.utils.Logging` is used for this
purpose, but that's tmt's logging "sneaking" away from what `tmt.log`
offers and implements. And that's not good, as it may mean slightly
different logging behavior than the one exhibited during the rest of
tmt run.
@happz happz disabled auto-merge March 5, 2023 21:15
@happz happz enabled auto-merge (squash) March 5, 2023 21:16
@happz happz merged commit 8e638a2 into main Mar 5, 2023
@happz happz deleted the bootstrap-log branch March 5, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code | logging Changes related to debug logging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants