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-32142: Add logging.trace_set_at #102

Merged
merged 3 commits into from Nov 5, 2021
Merged

DM-32142: Add logging.trace_set_at #102

merged 3 commits into from Nov 5, 2021

Conversation

timj
Copy link
Member

@timj timj commented Oct 11, 2021

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov
Copy link

codecov bot commented Oct 11, 2021

Codecov Report

Merging #102 (291cc6f) into master (e7cdf9e) will increase coverage by 0.10%.
The diff coverage is 100.00%.

❗ Current head 291cc6f differs from pull request most recent head 5effe52. Consider uploading reports for the commit 5effe52 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
+ Coverage   90.80%   90.90%   +0.10%     
==========================================
  Files          36       36              
  Lines        2087     2111      +24     
==========================================
+ Hits         1895     1919      +24     
  Misses        192      192              
Impacted Files Coverage Δ
python/lsst/utils/logging.py 81.63% <100.00%> (+1.19%) ⬆️
tests/test_logging.py 98.18% <100.00%> (+0.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7cdf9e...5effe52. Read the comment docs.

trace2_log = getLogger(f"TRACE2.{log_name}")
trace3_log = getLogger(f"TRACE3.{log_name}")
self.assertEqual(trace2_log.getEffectiveLevel(), logging.DEBUG)
self.assertEqual(trace3_log.getEffectiveLevel(), logging.INFO)
Copy link
Contributor

Choose a reason for hiding this comment

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

You might also confirm what happens if you do trace_set_at("lsst", 2) but look at getLogger("TRACE3.lsst.afw").getEffectiveLevel(). Since we're now having loggers start with lsst, there shouldn't be a need to support trace_set_at("", ...).

@timj timj merged commit 426b06a into master Nov 5, 2021
@timj timj deleted the tickets/DM-32142 branch November 5, 2021 17:41
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