1 2 3 4 5 6 7 8 9 | from django.shortcuts import render
import logging
logging_format = '%(asctime)s - %(levelname)s - %(filename)s:%(lineno)d - %(message)s'
logging.basicConfig(level=logging.DEBUG, format=logging_format)
def some_view(request):
logging.debug('This is a debugging message')
return render(request, 'some_template.html', {})
|
More like this
- Inspect object debugging tag by dballanc 5 years, 10 months ago
- Format transition middleware by limodou 6 years, 2 months ago
- MODPYTHON logging by adroffner 5 years, 2 months ago
- DRY custom ModelAdmin.list_display methods with a decorator by exogen 4 years, 8 months ago
- Improved Pickled Object Field by taavi223 3 years, 9 months ago
Comments