Skip to content

Commit

Permalink
fix: solved unicode bug(s) with sys.setdefaultencoding option
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Roth committed Jan 2, 2019
1 parent 95555d8 commit 2fe48d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/lokilogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import socket
from helpers import removeNonAsciiDrop

__version__ = '0.28.1'
__version__ = '0.29.0'

# Logger Class -----------------------------------------------------------------
class LokiLogger():
Expand Down Expand Up @@ -50,6 +50,9 @@ def __init__(self, no_log_file, log_file, hostname, remote_host, remote_port, cs
if "windows" in platform.lower():
self.linesep = "\r\n"

reload(sys)
sys.setdefaultencoding('utf8')

# Colorization ----------------------------------------------------
init()

Expand Down

0 comments on commit 2fe48d4

Please sign in to comment.