I\'m using urlib to hit my app not a browser so I can\'t see the debug screen when an error occurs. What\'s the best way to send the normal debug info to the console or a fi
If you're running the development server locally, you can just use print.
Also, you can use the logging module and redirect output to stdout. In settings.py put something like:
import logging.config
logging.config.fileConfig('/path/to/logging.conf')
Then make a logging.conf file:
[loggers]
keys=root
[handlers]
keys=consoleHandler
[formatters]
keys=simpleFormatter
[logger_root]
level=DEBUG
handlers=consoleHandler
[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)
[formatter_simpleFormatter]
format=format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
Check out the python documentation for more details and more examples.