fedora 23 fails to write utf-8 errors otherwise

This commit is contained in:
j 2016-02-12 18:37:21 +05:30
parent ca03f71659
commit 54f5ba33e1

View file

@ -101,8 +101,9 @@ def run():
logging.basicConfig(level=logging.DEBUG, format=log_format) logging.basicConfig(level=logging.DEBUG, format=log_format)
else: else:
logging.basicConfig(level=logging.DEBUG, logging.basicConfig(level=logging.DEBUG,
filename=settings.log_path, filemode='w', handlers=[logging.FileHandler(settings.log_path, 'w', 'utf-8')],
format=log_format) format=log_format)
options = { options = {
'debug': False, 'debug': False,
'log_function': log_request, 'log_function': log_request,