frostyx / copr / copr

Forked from copr/copr 7 years ago
Clone

3d642d7 [backend] encode 'msg' in LogRecord sooner

1 file Authored by praiskup 5 years ago, Committed by frostyx 5 years ago,
    [backend] encode 'msg' in LogRecord sooner
    
    RedisPublishHandler sends serialized LogRecord to RedisLogHandler,
    and when the log message and its arguments isn't really carefully
    typed - the path through serializer isn't lossless and
    RedisLogHandler doesn't have enough information for proper log
    entry formatting (when it comes to finally writing to the log
    file).
    
    So expand the message arguments rather early (before it is
    json.dumps() serialized), when it is much easier to call __str__
    (and friends..) on the objects automatically.
    
    Fix: #488, #621
    
        
file modified
+6 -0