From c2969acc4fa57980569fb23f262db64808358b36 Mon Sep 17 00:00:00 2001 From: JZQT Date: Mon, 27 Feb 2017 10:46:28 +0800 Subject: [PATCH] Make `tornado.log.LogFormatter` compatible with `logging.config.dictConfig`. --- tornado/log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tornado/log.py b/tornado/log.py index ac1bb95e..fbbe925c 100644 --- a/tornado/log.py +++ b/tornado/log.py @@ -89,8 +89,8 @@ class LogFormatter(logging.Formatter): logging.ERROR: 1, # Red } - def __init__(self, color=True, fmt=DEFAULT_FORMAT, - datefmt=DEFAULT_DATE_FORMAT, colors=DEFAULT_COLORS): + def __init__(self, fmt=DEFAULT_FORMAT, datefmt=DEFAULT_DATE_FORMAT, + style='%', color=True, colors=DEFAULT_COLORS): r""" :arg bool color: Enables color support. :arg string fmt: Log message format.