From 1e4c4d1cf77c8600a8935821f9d72f740b53aaf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20K=C3=A1cha?= <ph@cesnet.cz> Date: Fri, 2 Oct 2015 12:03:00 +0200 Subject: [PATCH] Log files are now explicitly UTF-8 to avoid balking on unusual data --- warden3/warden_client/warden_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/warden3/warden_client/warden_client.py b/warden3/warden_client/warden_client.py index 93704f4..d722739 100644 --- a/warden3/warden_client/warden_client.py +++ b/warden3/warden_client/warden_client.py @@ -281,7 +281,8 @@ class Client(object): fl = logging.FileHandler( filename=path.join( path.dirname(__file__), - filelog.get("file", "%s.log" % self.name))) + filelog.get("file", "%s.log" % self.name)), + encoding="utf-8") fl.setLevel(loglevel(filelog.get("level", "debug"))) fl.setFormatter(format_time) self.logger.addHandler(fl) -- GitLab