--- /c/Users/janis_000/OneDrive/tmp/__init__.py 2015-09-22 23:11:12.000000000 +0300 +++ /c/Users/janis_000/AppData/Local/Programs/Python/Python35/Lib/logging/__init__.py 2016-03-21 22:34:45.018889800 +0200 @@ -1692,6 +1692,8 @@ filename, rather than a StreamHandler. filemode Specifies the mode to open the file, if filename is specified (if filemode is unspecified, it defaults to 'a'). + encoding Specifies the encoding of the log file (if not specified it + defaults to None which means that the system locale is used). format Use the specified format string for the handler. datefmt Use the specified date/time format. style If a format string is specified, use this to specify the @@ -1740,8 +1742,9 @@ if handlers is None: filename = kwargs.pop("filename", None) mode = kwargs.pop("filemode", 'a') + encoding = kwargs.pop("encoding", None) if filename: - h = FileHandler(filename, mode) + h = FileHandler(filename, mode, encoding) else: stream = kwargs.pop("stream", None) h = StreamHandler(stream)