reloadware / reloadium

Hot Reloading and Profiling for Python
https://reloadium.io
Apache License 2.0
2.74k stars 56 forks source link

Reloadium debugger shows filtered log messages in django #169

Closed andyp05 closed 7 months ago

andyp05 commented 9 months ago

Describe the bug*

Django app running in Pycharm 2023.2, Windows 11

If debugging with native debugger, log messages that are filtered do not appear in the console. If debugging with reloadium, they do appear and clutter the console. Also, normal messages are duplicated in a different format.

To Reproduce

Steps to reproduce the behavior: In settings.py, create a LOGGING = entry

Example:

    LOGGING = {
        'version': 1,
        'disable_existing_loggers': False,
        'filters': {
            'skip_static_requests': {
                '()': 'django.utils.log.CallbackFilter',
                'callback': skip_static_requests
            },
        },
        'handlers': {
            'console': {
                'level': 'INFO',
                'filters': ['skip_static_requests'], 
                'class': 'logging.StreamHandler',
                'stream': sys.stdout,
                'formatter': 'verbose',
            },
        ...

Expected behavior

Filtered messages should not display in console. Also, messages should not duplicate if they are not filtered.

Screenshots

image

The Red messages should not appear and do not when using native debugger. Additionally, they are not formatted according to the settings.

The messages in Green are normal and formatted as per the settings LOGGING entry.

dkrystki commented 9 months ago

Fixed in Reloadium 1.3.0 and PyCharm plugin 1.3.0

andyp05 commented 9 months ago

Just upgraded to Pycharm plugin 1.3 Same problem. Nothing has changed.

dkrystki commented 7 months ago

Fixed in Reloadium 1.3.2 and PyCharm plugin 1.3.2