4👍
✅
You can use the logging.StreamHandler
class. For example, defining LOGGING in settings.py
as follows:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'level': 'DEBUG',
'filters': None,
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django': {
'handlers': ['console'],
'level': 'DEBUG',
},
},
}
Source:stackexchange.com