Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30554 closed Uncategorized (invalid)

Excessive logging by autoreload in v 2.2.1 and 2.2.2

Reported by: Phoebe Bright Owned by: nobody
Component: Core (Other) Version: 2.2
Severity: Normal Keywords:
Cc: Tom Forbes Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

With these two versions I get over 3000 lines of logging by autoreload.py. It looks like this::

    DEBUG 2019-06-07 09:47:15,927 autoreload Watching dir /Users/phoebe/venv/skorie3/lib/python3.6/site-packages/import_export/locale with glob **/*.mo.
    DEBUG 2019-06-07 09:47:15,939 autoreload Watching dir /Users/phoebe/venv/skorie3/lib/python3.6/site-packages/imagekit/locale with glob **/*.mo.
    DEBUG 2019-06-07 09:47:15,945 autoreload Watching dir /Users/phoebe/venv/skorie3/lib/python3.6/site-packages/django_social_share/locale with glob **/*.mo.
    DEBUG 2019-06-07 09:47:15,953 autoreload Watching dir /Users/phoebe/Development/skorie/obstacles/locale with glob **/*.mo.
    System check identified no issues (0 silenced).
    June 07, 2019 - 09:47:18
    Django version 2.2.2, using settings 'config.settings'
    Starting development server at http://127.0.0.1:8000/
    Quit the server with CONTROL-C.
    DEBUG 2019-06-07 09:47:18,990 autoreload File /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_decimal.cpython-36m-darwin.so first seen with mtime 1545635091.0
    DEBUG 2019-06-07 09:47:18,996 autoreload File /Users/phoebe/venv/skorie3/lib/python3.6/site-packages/tablib/packages/__init__.py first seen with mtime 1559667881.475002
    DEBUG 2019-06-07 09:47:18,996 autoreload File /Users/phoebe/venv/skorie3/lib/python3.6/site-packages/reportlab/pdfbase/ttfonts.py first seen with mtime 1559667875.595854
    DEBUG 2019-06-07 09:47:18,996 autoreload File /Users/phoebe/venv/skorie3/lib/python3.6/site-packages/stripe/api_resources/sku.py first seen with mtime 1559667881.135201

3000 more lines like this follow.

Downgrading back to 2.2 and the logging is not displayed. The change was made here to add logging: https://github.com/django/django/commit/6754bffa2b2df15a741008aa611c1bb0e8dff22b

Is there a way, or could a way be added, to turn this logging off?

Change History (5)

comment:1 by Mariusz Felisiak, 5 years ago

Cc: Tom Forbes added

comment:2 by Carlton Gibson, 5 years ago

Component: UncategorizedCore (Other)
Resolution: invalid
Status: newclosed

Is there a way, or could a way be added, to turn this logging off?

This is just standard logging. Adjust the level on the django.utils.autoreload logger:

'django.utils.autoreload': {
    'level': 'INFO',
    # ...
}

See Configuring logging docs for more details.

comment:3 by Tom Forbes, 5 years ago

Do you think it’s worth including a small message when the auto reloader starts and the logger is configured with the DEBUG level that tells people how to disable this?

comment:4 by Carlton Gibson, 5 years ago

Grrr… Happy to look at a patch, but you had to already opt-in to DEBUG level logging in order to see this output, so, really, for me, it’s ‘’Just Logging™’’.

("Happy to look at a patch”)

in reply to:  4 comment:5 by Phoebe Bright, 5 years ago

Totally understand now that I have the explanation but no solution found from googling so some kind of help would be great.

Note: See TracTickets for help on using tickets.
Back to Top