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

Replace --trace with --logdest in ArgumentParser #3

Merged
merged 1 commit into from Sep 3, 2015

Conversation

PaulPrice
Copy link
Contributor

Enhanced --logdest to support name=value arguments (like --trace)
and eliminated --trace.
Updated the unit test to test this modified functionality.

self.add_argument("-L", "--loglevel", nargs="*", action=LogLevelAction,
help="logging level for component; supported levels are [debug|warn|info|fatal] or an integer; "
"use -n for trace level n",
metavar="LEVEL|COMPONENT=LEVEL")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was not immediately obvious to me that the reference to -n meant --loglevel -n --- it looks like another argument name.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point.

@r-owen r-owen force-pushed the tickets/DM-3698 branch 2 times, most recently from 90390f9 to 7563516 Compare September 3, 2015 20:48
Enhanced --logdest to support name=value arguments (like --trace)
and eliminated --trace.
Updated the unit test to test this modified functionality.

The reason for this change is that use of pex_logging Trace and Debug
is deprecated; all such logging should be done with Log.
We are planning to switch from pex_logging to lsst.log and that
will force this change, since lsst.log has no Trace or Debug.
Thus we should have a way to set log level by log name.
That is what --trace does, but --trace does not support
named log levels and log level = - trace level, so using --trace
for --loglevel is confusing. It is also confusing to have two
different arguments that can and should do the same thing.
@r-owen r-owen merged commit 8023589 into master Sep 3, 2015
@ktlim ktlim deleted the tickets/DM-3698 branch August 25, 2018 06:50
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