diff sat/core/xmpp.py @ 3710:e3dddf65fa88

core (xmpp): specify profile when logging a connection problem
author Goffi <goffi@goffi.org>
date Tue, 30 Nov 2021 17:27:26 +0100
parents a806dcad6bfc
children b9718216a1c0
line wrap: on
line diff
--- a/sat/core/xmpp.py	Fri Nov 12 17:18:23 2021 +0100
+++ b/sat/core/xmpp.py	Tue Nov 30 17:27:26 2021 +0100
@@ -385,9 +385,7 @@
                 # TODO: create a ticket upstream, Twisted should work when optimization
                 #       is used
                 reason_str = str(reason.value.__class__)
-            log.warning("Connection {term_type}: {reason}".format(
-                term_type = term_type,
-                reason=reason_str))
+            log.warning(f"[{self.profile}] Connection {term_type}: {reason_str}")
         if not self.host_app.trigger.point("connection_" + term_type, connector, reason):
             return
         return cb(connector, reason)