Conversation
py/strato/common/log/log2text.py
Outdated
| self._clock = self._relativeClock if relativeTime else self._absoluteClock | ||
| self._relativeClockFormat = "%.6f" if microsecondPrecision else "%.3f" | ||
| self._minimumLevel = logging.INFO if noDebug else logging.DEBUG | ||
| self._minimumLevel = self._min_level(min_level, noDebug) |
Contributor
There was a problem hiding this comment.
why would you pass both of the parameters and not decide on min-level before the init? think that would be cleaner
py/strato/common/log/log2text.py
Outdated
| noDebug=args.noDebug, relativeTime=args.relativeTime, noColors=args.noColors, | ||
| microsecondPrecision=args.microsecondPrecision, showFullPaths=args.showFullPaths, | ||
| withThreads=args.withThreads, utc=args.utc) | ||
| withThreads=args.withThreads, utc=args.utc, min_level=args.min_level) |
Contributor
There was a problem hiding this comment.
camel case it please
5d3c4c4 to
934135e
Compare
py/strato/common/log/log2text.py
Outdated
|
|
||
| formatter = Formatter( | ||
| noDebug=args.noDebug, relativeTime=args.relativeTime, noColors=args.noColors, | ||
| minimumLevel=min_level(args.min_level, args.noDebug), relativeTime=args.relativeTime, noColors=args.noColors, |
Contributor
|
ship it |
dfebcca to
c052488
Compare
c052488 to
2551b14
Compare
py/strato/common/log/log2text.py
Outdated
| parser = argparse.ArgumentParser() | ||
| parser.add_argument("logFiles", metavar='logFile', nargs='*', help='logfiles to read') | ||
| parser.add_argument('-d', "--noDebug", action='store_true', help='filter out debug messages') | ||
| parser.add_argument('-l', '--min-level', action='store', default='', help='minimal log level to display (substring is OK, case-insensitive)') |
There was a problem hiding this comment.
curios: why not defining -v / --verbose with action=count (see: https://docs.python.org/2/library/argparse.html#action)?
this way every occurrence of -v will increase the logging level to display.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.