django-after-response icon indicating copy to clipboard operation
django-after-response copied to clipboard

Logger Problem

Open Oofone opened this issue 7 years ago • 1 comments

I don't know how exactly this error occurs, but in my case i get the following error:

No handlers could be found for logger "after_response.signals"

More disturbing however is the fact that the database update I placed within the decorated function doesn't happen either. I understand the function isn't getting executed but I have no idea why. Any idea why this is happening?

I'm running django version 1.11.13 on Python 2.7.

Oofone avatar Jul 05 '18 11:07 Oofone

The following code will print out any error messages. In my case I attached @after_response.enable to an object method so had to repass the object (for self) in ie obj.method.after_response(obj, 'First arg')

import after_response
import logging
logging.getLogger('after_response.signals').addHandler(logging.StreamHandler()); 

McPo avatar Apr 01 '20 12:04 McPo