I am using django over Plesk. For this, it is necessary to install passengers in plesk. https://support.plesk.com/hc/en-us/articles/115002701209-How-to-allow-installing-and-install-Django-applications-
When I write python manage.py runserver while working on localhost, I can watch all manage.py logs instantly.
But since I am not running this command while working on this plesk passenger, I cannot see any log record.
How can I watch manage.py log records instantly?
im using centos7 - plesk onyx
i found solution
just add settings.py
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'WARNING',
'class': 'logging.FileHandler',
'filename': 'debug.log',
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'WARNING',
'propagate': True,
},
},
'applogfile': {
'level':'WARNING',
'class':'logging.handlers.RotatingFileHandler',
'filename': os.path.join(BASE_DIR, 'logfile.log'),
'maxBytes': 1024*1024*15, # 15MB
'backupCount': 10,
},
}