core (log): removed Android hack:

this hack is not needed anymore with Python 3 port and was actually causing a crash.
This commit is contained in:
Goffi 2019-10-16 08:39:35 +02:00
commit 8442cf691e

View file

@ -333,7 +333,6 @@ class ConfigureStandard(ConfigureBasic):
def configureFormat(self, fmt):
super(ConfigureStandard, self).configureFormat(fmt)
import logging
import sys
class SatFormatter(logging.Formatter):
"""Formatter which manage SàT specificities"""
@ -359,12 +358,7 @@ class ConfigureStandard(ConfigureBasic):
s = super(SatFormatter, self).format(record)
if do_color:
s = ConfigureStandard.ansiColors(record.levelname, s)
if sys.platform == "android":
# FIXME: dirty hack to workaround android encoding issue on log
# need to be fixed properly
return s.encode("ascii", "ignore")
else:
return s
return s
self.formatterClass = SatFormatter