# HG changeset patch # User Goffi # Date 1545907204 -3600 # Node ID e55f871fa9db6b2e1c509fec8c7ee8badf979ade # Parent a58e380c1c3703e917b725e8324ea429fa6f948a core (log): fixed double call to ansiColors diff -r a58e380c1c37 -r e55f871fa9db sat/core/log_config.py --- a/sat/core/log_config.py Thu Dec 27 11:40:04 2018 +0100 +++ b/sat/core/log_config.py Thu Dec 27 11:40:04 2018 +0100 @@ -56,9 +56,8 @@ isatty = sys.stdout.isatty() except AttributeError: isatty = False - if ( - force_colors or isatty - ): # FIXME: isatty should be tested on each handler, not globaly + # FIXME: isatty should be tested on each handler, not globaly + if (force_colors or isatty): # we need colors log.Logger.post_treat = lambda logger, level, message: self.ansiColors( level, message @@ -123,11 +122,8 @@ can_colors and self.LOGGER_CLASS.colors ) or self.LOGGER_CLASS.force_colors: message = event.get("message", tuple()) - level = event.get("level", C.LOG_LVL_INFO) if message: - event["message"] = ( - self.ansiColors(level, "".join(message)), - ) # must be a tuple + event["message"] = ("".join(message),) # must be a tuple observer(event) # we can now call the original observer return observer_hook