~petersanchez/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH django-impersonate] Downgrade signals logging from warning to debug

Hugo Rodger-Brown
Details
Message ID
<bd1429321fb4a7f46274.1607609806@YJ-LDN-MBA-033>
DKIM signature
missing
Download raw message
Patch: +2 -2
# HG changeset patch
# User Hugo Rodger-Brown <hugo@yunojuno.com>
# Date 1607608487 0
#      Thu Dec 10 13:54:47 2020 +0000
# Branch downgrade-logging
# Node ID bd1429321fb4a7f4627448681d369d07875c5edf
# Parent  a174b1c67a73699e1ea51d1433db7d0f22c4e6ef
Downgrade signals logging from warning to debug

In production we are seeing the warnings raised by the
signals appearing frequently. I believe this is caused by
people having multiple tabs open, stopping impersonating
in one, and then some time later clicking the stop impersonate
link in another. This is a completely valid use case, and
shouldn't raise a warning.

diff --git a/impersonate/signals.py b/impersonate/signals.py
--- a/impersonate/signals.py
+++ b/impersonate/signals.py
@@ -87,7 +87,7 @@
        log.session_ended_at = tz_now()
        log.save()
    except ImpersonationLog.DoesNotExist:
        logger.warning(
        logger.debug(
            (u'Unfinished ImpersonationLog could not be found for: '
             u'{0}, {1}, {2}').format(
                 impersonator,
@@ -96,7 +96,7 @@
             )
        )
    except ImpersonationLog.MultipleObjectsReturned:
        logger.warning(
        logger.debug(
            (u'Multiple unfinished ImpersonationLog matching: '
             u'{0}, {1}, {2}').format(
                 impersonator,
Details
Message ID
<20201217031801.rk224g7royj333xy@thinkpad>
In-Reply-To
<bd1429321fb4a7f46274.1607609806@YJ-LDN-MBA-033> (view parent)
DKIM signature
missing
Download raw message
Thanks! This was applied.

On 12/10, Hugo Rodger-Brown wrote:
># HG changeset patch
># User Hugo Rodger-Brown <hugo@yunojuno.com>
># Date 1607608487 0
>#      Thu Dec 10 13:54:47 2020 +0000
># Branch downgrade-logging
># Node ID bd1429321fb4a7f4627448681d369d07875c5edf
># Parent  a174b1c67a73699e1ea51d1433db7d0f22c4e6ef
>Downgrade signals logging from warning to debug
Reply to thread Export thread (mbox)