Project

General

Profile

0001-do-not-log-errors-if-the-connector-is-known-to-be-do.patch

Benjamin Dauvergne, 13 Mar 2019 06:43 PM

Download (1016 Bytes)

View differences:

Subject: [PATCH] do not log errors if the connector is known to be down
 (#31398)

But still log something.
 passerelle/base/models.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
passerelle/base/models.py
644 644

  
645 645
    def _log(self, levelname, message, *args, **kwargs):
646 646
        if self.connector.down():
647
            # don't log if the connector is known to be down
648
            return
647
            # don't log errors if the connector is known to be down
648
            if levelname in ['CRITICAL', 'ERROR', 'FATAL']:
649
                levelname = 'INFO'
649 650
        levelno = getattr(logging, levelname)
650 651
        if self._logger.level <= levelno:
651 652

  
652
-