aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2022-05-04 08:47:30 +0200
committerPapoteur <papoteur@mageia.org>2022-05-04 09:03:04 +0200
commit1dc269a1d6a6136fc33f1f81af4a71a3c8be593c (patch)
treeed3165f0156b28d021193c4b583a5e10684fd5c3 /src
parent48a6c3e69704c975e4d87bc99ae917c4a3a6598e (diff)
downloadmsec-1dc269a1d6a6136fc33f1f81af4a71a3c8be593c.tar
msec-1dc269a1d6a6136fc33f1f81af4a71a3c8be593c.tar.gz
msec-1dc269a1d6a6136fc33f1f81af4a71a3c8be593c.tar.bz2
msec-1dc269a1d6a6136fc33f1f81af4a71a3c8be593c.tar.xz
msec-1dc269a1d6a6136fc33f1f81af4a71a3c8be593c.zip
More robust logging in file against internationalized strings
Diffstat (limited to 'src')
-rwxr-xr-xsrc/msec/libmsec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/msec/libmsec.py b/src/msec/libmsec.py
index fa5a121..f7b7f54 100755
--- a/src/msec/libmsec.py
+++ b/src/msec/libmsec.py
@@ -128,7 +128,7 @@ class Log:
# log to file
if log_file:
try:
- self.file_h = logging.FileHandler(self.log_path)
+ self.file_h = logging.FileHandler(self.log_path, encoding='utf-8', mode='a+')
formatter = logging.Formatter('%(asctime)s %(levelname)s: %(message)s')
self.file_h.setFormatter(formatter)
self.logger.addHandler(self.file_h)