From: Ben Darnell Date: Sat, 20 Oct 2018 14:16:28 +0000 (-0400) Subject: Merge commit 'pull/origin/2506' X-Git-Tag: v6.0.0b1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4ab48d482e6ca5f7a340e516faebf2821cf7913;p=thirdparty%2Ftornado.git Merge commit 'pull/origin/2506' --- f4ab48d482e6ca5f7a340e516faebf2821cf7913 diff --cc tornado/log.py index 2ac2e4678,1bb6f9571..435cd7185 --- a/tornado/log.py +++ b/tornado/log.py @@@ -229,19 -221,17 +229,21 @@@ def enable_pretty_logging(options: Any filename=options.log_file_prefix, maxBytes=options.log_file_max_size, backupCount=options.log_file_num_backups, - encoding="utf-8") # type: logging.Handler - elif rotate_mode == 'time': ++ encoding="utf-8", + ) # type: logging.Handler + elif rotate_mode == "time": channel = logging.handlers.TimedRotatingFileHandler( filename=options.log_file_prefix, when=options.log_rotate_when, interval=options.log_rotate_interval, backupCount=options.log_file_num_backups, - encoding="utf-8") ++ encoding="utf-8", + ) else: - error_message = 'The value of log_rotate_mode option should be ' +\ - '"size" or "time", not "%s".' % rotate_mode + error_message = ( + "The value of log_rotate_mode option should be " + + '"size" or "time", not "%s".' % rotate_mode + ) raise ValueError(error_message) channel.setFormatter(LogFormatter(color=False)) logger.addHandler(channel)