fix logging

remotes/origin/HEAD
Max Yakovenko 8 years ago
parent 79a5317d6a
commit 204753c4e7
  1. 6
      eshop_project/settings/base.py

@ -231,7 +231,7 @@ LOGGING = {
'prod_file_handler': { 'prod_file_handler': {
'level': 'ERROR', 'level': 'ERROR',
'class': 'logging.handlers.RotatingFileHandler', 'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/eshop_main_prod.log', 'filename': '../logs/eshop_main_prod.log',
'maxBytes': 1024 * 1024 * 5, 'maxBytes': 1024 * 1024 * 5,
'backupCount': 7, 'backupCount': 7,
'formatter': 'main_formatter', 'formatter': 'main_formatter',
@ -240,7 +240,7 @@ LOGGING = {
'debug_file_handler': { 'debug_file_handler': {
'level': 'DEBUG', 'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler', 'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/eshop_main_dev.log', 'filename': '../logs/eshop_main_dev.log',
'maxBytes': 1024 * 1024 * 5, 'maxBytes': 1024 * 1024 * 5,
'backupCount': 7, 'backupCount': 7,
'formatter': 'main_formatter', 'formatter': 'main_formatter',
@ -249,7 +249,7 @@ LOGGING = {
}, },
'loggers': { 'loggers': {
'django.request': { 'django.request': {
'handlers': ['mail_admins','prod_file_handler' if DEBUG else 'debug_file_handler'], 'handlers': ['mail_admins','debug_file_handler' if DEBUG else 'prod_file_handler'],
'level': 'ERROR', 'level': 'ERROR',
'propagate': True 'propagate': True
} }

Loading…
Cancel
Save