python - how do I get django runserver to show me DeprecationWarnings and other useful messages? -



python - how do I get django runserver to show me DeprecationWarnings and other useful messages? -

i've updated django installation 1.2 1.3. on developer scheme didn't warnings deprecated calls. 1 time moved code onto production apache server, saw many 'deprecationwarning' messages in apache logs. how have phone call runserver these these messages too?

currently phone call this:

python manage.py runserver --verbosity 2

the runserver command ignores verbosity option: https://code.djangoproject.com/ticket/15132

i'd recommend setting logger , directing output stderr: https://docs.djangoproject.com/en/1.3/topics/logging/

for example:

import logging logger = logging.getlogger('django') # django's catch-all logger hdlr = logging.streamhandler() # logs stderr default formatter = logging.formatter('%(asctime)s %(levelname)s %(message)s') hdlr.setformatter(formatter) logger.addhandler(hdlr) logger.setlevel(logging.warning)

python django

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -