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-33809: Change how --log-level works #658

Merged
merged 13 commits into from Mar 10, 2022
Merged

DM-33809: Change how --log-level works #658

merged 13 commits into from Mar 10, 2022

Conversation

timj
Copy link
Member

@timj timj commented Mar 8, 2022

Now by default only applies to the lsst root logger.

Checklist

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

It will be changed later by the log-level call.
@codecov
Copy link

codecov bot commented Mar 8, 2022

Codecov Report

Merging #658 (d5436ce) into main (4c4cdd6) will increase coverage by 0.00%.
The diff coverage is 86.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #658   +/-   ##
=======================================
  Coverage   83.68%   83.69%           
=======================================
  Files         239      239           
  Lines       30401    30447   +46     
  Branches     5098     5106    +8     
=======================================
+ Hits        25441    25482   +41     
- Misses       3806     3811    +5     
  Partials     1154     1154           
Impacted Files Coverage Δ
python/lsst/daf/butler/cli/utils.py 92.80% <ø> (-0.03%) ⬇️
python/lsst/daf/butler/cli/cliLog.py 75.83% <80.76%> (+1.79%) ⬆️
python/lsst/daf/butler/tests/cliLogTestBase.py 90.44% <88.00%> (-0.71%) ⬇️
python/lsst/daf/butler/cli/opt/options.py 100.00% <100.00%> (ø)
python/lsst/daf/butler/script/configDump.py 100.00% <100.00%> (ø)
tests/test_cliCmdConfigDump.py 97.39% <100.00%> (+0.06%) ⬆️

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 4c4cdd6...d5436ce. Read the comment docs.

timj added 7 commits March 9, 2022 09:23
Encountered during log testing, if the subset is a simple
string the command would not print it. Now fallback to
using print() if the subset is not a Config.
Now only applies to the lsst logger or logger specified
in the environment variable. This will stop non-LSST
loggers from contaminating the output.
The lsst logger is always relevant to daf_butler so always set it.
DAF_BUTLER_ROOT_LOGGER is now a colon-separated list of additional
root loggers.
doc/lsst.daf.butler/scripts/logging.rst Outdated Show resolved Hide resolved
doc/lsst.daf.butler/scripts/logging.rst Outdated Show resolved Hide resolved
doc/lsst.daf.butler/scripts/logging.rst Outdated Show resolved Hide resolved
doc/lsst.daf.butler/scripts/logging.rst Outdated Show resolved Hide resolved
@@ -0,0 +1,4 @@
The command-line tooling has changed how it sets the default logger when using ``--log-level``.
Now only the default logger(s) (``lsst`` and the colon-separated values stored in the ``$DAF_BUTLER_ROOT_LOGGER``) will be affected by using ``--log-level`` without a specific logger name.
Copy link
Contributor

Choose a reason for hiding this comment

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

See below for possible changes here and in line 4.

python/lsst/daf/butler/cli/cliLog.py Show resolved Hide resolved
Co-authored-by: Kian-Tat Lim <ktl@slac.stanford.edu>
@timj timj merged commit 7a9d24d into main Mar 10, 2022
@timj timj deleted the tickets/DM-33809 branch March 10, 2022 03:21
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