-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
Enable pytest live log and show warning logs on GitHub Actions CI runs #35912
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,8 @@ def _configure_library_root_logger() -> None: | |
formatter = logging.Formatter("[%(levelname)s|%(pathname)s:%(lineno)s] %(asctime)s >> %(message)s") | ||
_default_handler.setFormatter(formatter) | ||
|
||
library_root_logger.propagate = False | ||
is_ci = os.getenv("CI") is not None and os.getenv("CI").upper() in {"1", "ON", "YES", "TRUE"} | ||
library_root_logger.propagate = True if is_ci else False | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need On CircleCI, we use |
||
|
||
|
||
def _reset_library_root_logger() -> None: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having
UserWarning
(or anything else as 2nd arg.) is not going to work. It givesPreviously, some log handler can handle the above exception:
But after this PR, a new extra handle is used and the exception is kept and thrown