-
Notifications
You must be signed in to change notification settings - Fork 28
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
remove MultilineLogger, split logs with \n
into multiple messages
#1377
Conversation
\n
into multiple messages\n
into multiple messages
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1377 +/- ##
==========================================
- Coverage 78.71% 78.66% -0.06%
==========================================
Files 117 117
Lines 7738 7724 -14
==========================================
- Hits 6091 6076 -15
- Misses 1647 1648 +1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
We should ask @stscieisenhamer what problem the MultilineLogger was put in to solve. Since it is in the associations I'm assuming that he will know. |
removing the MultilineLogger package from the associations results in all 29 DMS test numbers in the log file for the regression tests. |
Thanks for testing this. Which log messages are you referring to? Specifically, what's the log message for DMS413? |
2186:2024-08-23 10:56:13,773 - stpipe.ExposurePipeline - INFO - DMS413 MSG: Testing that result is a Level 2 model.......Pass |
Thanks! I was recently looking at the code that parses this and I believe only the |
8fe7bfb
to
b4e01a1
Compare
I have not really looked at the metrics logger code. I can if needed... |
Thanks for the offer. Hopefully that will not be needed. I don't think this PR will fully fix the log parsing issues but I think it's more a sign that using the logs for testing DMS requirements is problematic (given the state of logging in the pipeline). @zacharyburnett has an alternative solution in the works so hopefully things will change (for the better) soon. |
b4e01a1
to
ed7131c
Compare
ed7131c
to
a20997e
Compare
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.
It was a solution to making messages all have a logging tag. If it is a problem, then it can be removed.
I marked this PR as
no-changelog-entry-needed
as I don't believe it changes any public API.The use of
MultilineLogger
is problematic as it causes all later created loggers to use this class (which is not 100% compatible with all logging usage). As the main thing it achieves is splitting log messages that contain newlines into multiple lines this PR also switches all log messages (that I was able to find) that contain a newline into multiple log messages. Note that sinceMultilineLogger
is registered during an import it is unpredictable which loggers become instances ofMultilineLogger
(and which are the defaultLogger
) so it's likely this PR introduces a small change in the log output for some modified log messages.Although unknown at this point,
MultilneLogger
may be contributing to the issues currently seen with themetrics_logger
(see https://jira.stsci.edu/browse/SCSB-174)Regression tests running at https://github.com/spacetelescope/RegressionTests/actions/runs/10514305515
Checklist
CHANGES.rst
under the corresponding subsection