From 54f5ba33e1a94dcad21e48e5a1312fc36be57c85 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 12 Feb 2016 18:37:21 +0530 Subject: [PATCH] fedora 23 fails to write utf-8 errors otherwise --- oml/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oml/server.py b/oml/server.py index 7c274cd..3d083ea 100644 --- a/oml/server.py +++ b/oml/server.py @@ -101,8 +101,9 @@ def run(): logging.basicConfig(level=logging.DEBUG, format=log_format) else: logging.basicConfig(level=logging.DEBUG, - filename=settings.log_path, filemode='w', + handlers=[logging.FileHandler(settings.log_path, 'w', 'utf-8')], format=log_format) + options = { 'debug': False, 'log_function': log_request,