From: JZQT Date: Mon, 27 Feb 2017 02:46:28 +0000 (+0800) Subject: Make `tornado.log.LogFormatter` compatible with `logging.config.dictConfig`. X-Git-Tag: v4.5.0~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1966%2Fhead;p=thirdparty%2Ftornado.git Make `tornado.log.LogFormatter` compatible with `logging.config.dictConfig`. --- diff --git a/tornado/log.py b/tornado/log.py index ac1bb95ea..fbbe925c7 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.