django-rq icon indicating copy to clipboard operation
django-rq copied to clipboard

proper configuration for logging in 2.x?

Open ccurvey opened this issue 5 years ago • 3 comments

I have this in my Django settings.py

LOGGING = {
    [snip]
    'rq' : {
        'handlers':['console'],
        'level':'ERROR'
    },
    'rq.worker' : {
        'handlers':['console'],
        'level':'ERROR'
    },
    [snip]
}

And that worked perfect under 0.9.6. I've recently upgraded to 2.1.0, and now I'm seeing this in my logs:

020-01-14 12:28:09,365 DEBG 'default-3' stdout output:
[14/Jan/2020 07:28:09] rq.worker - INFO [perform_job:899] default: Job OK (b205da10-bf43-4772-9090-86bb60d6a471)
[14/Jan/2020 07:28:09] rq.worker - INFO [perform_job:899] default: Job OK (b205da10-bf43-4772-9090-86bb60d6a471)
[14/Jan/2020 07:28:09] rq.worker - INFO [perform_job:899] default: Job OK (b205da10-bf43-4772-9090-86bb60d6a471)

I see that there were some recent changes to how logging is set up internally, but the docs make me thing that my older solution should still work.

Any idea what I'm doing wrong?

ccurvey avatar Jan 14 '20 12:01 ccurvey

Did you manage to fix it, @ccurvey ? I have the same problem.

hannonq avatar Apr 08 '20 13:04 hannonq

Did you manage to fix it, @ccurvey ? I have the same problem.

nope. It's an irritant to me -- not worth digging into the source (yet). I'm hoping this will be a shallow bug for someone that is already familiar with the code.

ccurvey avatar Apr 08 '20 13:04 ccurvey

Looks like the log level is set according to the verbosity flag..

I set --verbosity=0 to get it working for my use case.

alysivji avatar Jun 06 '22 19:06 alysivji