#1014 backend: once more redis logger + exceptions
Merged 11 months ago by praiskup. Opened 11 months ago by praiskup.
copr/ praiskup/copr exception-handling-once-more  into  master

@@ -393,6 +393,10 @@ 

          # copr specific semantics

          record.who = self.who


+         # First argument to 'log.exception()' should be 'str' type.  If it is

+         # not, we need to convert it before using '%' operator below.

+         record.msg = str(record.msg)


          # For the message arguments, it is better to expand them right now

          # instead of relying on method in json.dumps(..., default=default)

          # and even worse rely on it's reverse action in RedisLogHandler.

The RedisPublishHandler expands 'logrecord.msg % logrecord.args', but we
use 'log.exception(ex)' idiom on many places in backend code - and the
'%' operator doesn't convert the left operand automatically.

rebased onto d4fda3e

11 months ago

Metadata Update from @msuchy:
- Pull-request tagged with: can-be-merged

11 months ago

Commit 69a4efc fixes this pull-request

Pull-Request has been merged by praiskup

11 months ago