Search code examples
pythonpython-3.xdjangodebugginglogging

How to avoid LOGENTRIES_TOKEN spam logs in django?


When i run the python manage.py <somecmd>, i'm getting the below error:

It appears the LOGENTRIES_TOKEN parameter you entered is incorrect!

How can i disable this log, this log spamming across the access log.

I've tried to control it using log_level as of now, but it's not working.


Solution

  • setting verbose to False in the config will stop the 'incorrect log_entries token' log, we need to set it everywhere we're using the logentries.LogentriesHandler

    Prev version:

    "logentries": {
                "level": "DEBUG",
                "token": os.environ.get("LE_TOKEN", ""),
                "class": "logentries.LogentriesHandler",
                ...
                ...
            }
    

    Current version:

    "logentries": {
                "level": "DEBUG",
                "verbose": False,
                "token": os.environ.get("LE_TOKEN", ""),
                "class": "logentries.LogentriesHandler",
                ...
                ...
            }