Home > front end >  Django Settings after logging configuration server in 500
Django Settings after logging configuration server in 500

Time:12-12

Today again to django configuration log, in local window is ok, but on the server directly above 500,
Configuration Settings are as follows:
The import OS
LOGGING_DIR='/data/log/# log folder path
# if platform. The system ()=='Windows' :
# LOGGING_DIR='C: \ \ Users \ \ \ \ Desktop \ \ yutang - 10 server \ \ log'
# the else:
# LOGGING_DIR='/data/log'
# is our next to log configuration
LOGGING={
"Version" : 1,
'disable_existing_loggers: False,
'handlers' : {
'the console: {
'level' : 'DEBUG',
'class' : 'logging. StreamHandler',
},
'the db: {
'level' : 'DEBUG',
'class' : 'logging. Handlers. RotatingFileHandler',
'filename' : OS. Path. Join (LOGGING_DIR, 'django_db. Log),
'maxBytes: 1024 * 1024, # 1 m size segmentation
'backupCount: 30
},
'django_run: {
'level' : 'INFO',
'class' : 'logging. Handlers. TimedRotatingFileHandler',
'filename' : OS. Path. Join (LOGGING_DIR, 'django_debug. Log),
'when' : 'midnight',
'backupCount: 7
},
},
'loggers: {
'the django: {
'handlers: [' django_run', 'the console],
'level' : 'INFO',
'the propagate: True
},
# this is the database
'the django. Db. Backends: {
'handlers: [' db', 'the console],
'the propagate: True,
'level' : 'DEBUG'
},
# this is the debug
'log' : {
'handlers: [' django_run', 'the console],
'level' : 'INFO',
'the propagate: True,
},
},
}
On the server log files are generated, but just can not access the server, has been 500, bosses guidance, thank you very much
  • Related