summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7b409af)
Level does not specify that only messages of this level are printed
out, but the minimum level. So a definition like this
FORMAT = "Debug: %(asctime)-15s %(message)s"
FORMAT = "%(asctime)-15s %(message)s"
misleads the user into thinking that every message printed out is
actually a debug message, which is not true.
We now use "%(message)s" for everything except verbose mode which
annotates the timestamp to the message.
if options.verbose and options.quiet:
parser.error("please use either verbose (--verbose) or quiet (--quiet) option")
if options.verbose and options.quiet:
parser.error("please use either verbose (--verbose) or quiet (--quiet) option")
- FORMAT = "Debug: %(asctime)-15s %(message)s"
+ FORMAT = "%(asctime)-15s %(message)s"
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
elif options.quiet:
logging.basicConfig(level=logging.DEBUG, format=FORMAT)
elif options.quiet:
- FORMAT = "Critical: %(message)s"
logging.basicConfig(level=logging.CRITICAL, format=FORMAT)
else:
logging.basicConfig(level=logging.CRITICAL, format=FORMAT)
else:
logging.basicConfig(level=logging.INFO, format=FORMAT)
logging.basicConfig(level=logging.INFO, format=FORMAT)