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

DM-31103: Add some python logging compatibility features #56

Merged
merged 13 commits into from Jul 15, 2021

Conversation

timj
Copy link
Member

@timj timj commented Jul 14, 2021

No description provided.

timj added 5 commits July 14, 2021 10:06
This is the preferred way to create a LogRecord since it allows
registered record factories to augment the record in a consistent
way.
These three convenience methods are designed to work without
a logger but they weren't returning the answer.
Copy link
Contributor

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Looks good. My worry is that when we start substituting lsst.log with logging there may be cases that pass lsst.log logging level numbers to logging methods, would be interesting to find Level 10000 in the logs then.

python/lsst/log/log/logContinued.py Outdated Show resolved Hide resolved
python/lsst/log/log/logContinued.py Outdated Show resolved Hide resolved
python/lsst/log/log/logContinued.py Outdated Show resolved Hide resolved
python/lsst/log/log/logContinued.py Show resolved Hide resolved
timj added 7 commits July 15, 2021 08:17
They are hardly used anywhere (about 15 occurrences in the entire
code base).
The kwargs only come via infof-style logging and (1) those
are assumed to be formatted into the message ahead of time and
(2) are deprecated.

This will have to be changed if MDC is ever supported.
@andy-slac
Copy link
Contributor

@timj, K-T just hinted me that I left print() in test_lg.py in my previous merge (line 599), could you kindly kill that?

@timj timj merged commit c17c432 into master Jul 15, 2021
@timj timj deleted the tickets/DM-31103 branch July 15, 2021 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants