]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Make `tornado.log.LogFormatter` compatible with `logging.config.dictConfig`. 1966/head
authorJZQT <jzqt@witcoder.com>
Mon, 27 Feb 2017 02:46:28 +0000 (10:46 +0800)
committerJZQT <jzqt@witcoder.com>
Mon, 27 Feb 2017 02:46:52 +0000 (10:46 +0800)
tornado/log.py

index ac1bb95ea781e421f4f1c94246686c2a059f06bb..fbbe925c76ab37f52cb5e86a77c86e59bf39af16 100644 (file)
@@ -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.