thread and level in simple log formatter
The log messages are a mess without any allocation to threads.
This commit is contained in:
parent
26e58cee56
commit
d371179487
2
logging
2
logging
@ -53,7 +53,7 @@ formatter = full
|
||||
|
||||
[formatter_simple]
|
||||
# Simple output format
|
||||
format = %(message)s
|
||||
format = [%(thread)x] %(levelname)s: %(message)s
|
||||
|
||||
[formatter_full]
|
||||
# Full output format
|
||||
|
@ -56,7 +56,8 @@ def start(name="radicale", filename=None, debug=False):
|
||||
"Logging configuration file '%s' not found, using stderr." %
|
||||
filename)
|
||||
handler = logging.StreamHandler(sys.stderr)
|
||||
handler.setFormatter(logging.Formatter("%(message)s"))
|
||||
handler.setFormatter(
|
||||
logging.Formatter("[%(thread)x] %(levelname)s: %(message)s"))
|
||||
logger.addHandler(handler)
|
||||
if debug:
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
Loading…
Reference in New Issue
Block a user