Commit f58792eb authored by Vincent Pelletier's avatar Vincent Pelletier

product/ERP5/bin/zopewsgi.py: Resolve the XXX comments I just added

Thanks to Jérôme for digging these resources up.
parent 1cfc0ad4
...@@ -196,7 +196,12 @@ def runwsgi(): ...@@ -196,7 +196,12 @@ def runwsgi():
else: else:
event_log_handler = logging.FileHandler(args.event_log_file) event_log_handler = logging.FileHandler(args.event_log_file)
event_log_handler.setFormatter(logging.Formatter( event_log_handler.setFormatter(logging.Formatter(
# XXX: why are msec treated separately from the rest of the timestamp ? # Note about msec: strftime does not have a standard was of specifying
# how milliseconds are to be rendered, and especially what separator to
# use. So, treat milliseconds separately from the rest of the timestamp.
# See also:
# https://docs.python.org/3/library/logging.html#logging.Formatter.formatTime
# https://stackoverflow.com/questions/6290739/python-logging-use-milliseconds-in-time-format/
"------\n%(asctime)s,%(msecs)03d %(levelname)s %(name)s %(message)s", "------\n%(asctime)s,%(msecs)03d %(levelname)s %(name)s %(message)s",
"%Y-%m-%d %H:%M:%S")) "%Y-%m-%d %H:%M:%S"))
root_logger.addHandler(event_log_handler) root_logger.addHandler(event_log_handler)
...@@ -232,7 +237,6 @@ def runwsgi(): ...@@ -232,7 +237,6 @@ def runwsgi():
if conf.debug_mode: if conf.debug_mode:
console_handler = logging.StreamHandler(sys.stderr) console_handler = logging.StreamHandler(sys.stderr)
console_handler.setFormatter(logging.Formatter( console_handler.setFormatter(logging.Formatter(
# XXX: why are msec treated separately from the rest of the timestamp ?
"%(asctime)s,%(msecs)03d %(levelname)s %(name)s %(message)s", "%(asctime)s,%(msecs)03d %(levelname)s %(name)s %(message)s",
"%Y-%m-%d %H:%M:%S")) "%Y-%m-%d %H:%M:%S"))
console_handler.setLevel(logging.NOTSET) console_handler.setLevel(logging.NOTSET)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment