소스 검색

正式配置定制化推送日志

locky 1 년 전
부모
커밋
2452e0622f
3개의 변경된 파일43개의 추가작업 그리고 1개의 파일을 삭제
  1. 14 0
      AnsjerPush/cn_config/cn_formal_settings.py
  2. 14 0
      AnsjerPush/eur_config/eur_formal_settings.py
  3. 15 1
      AnsjerPush/us_config/formal_settings.py

+ 14 - 0
AnsjerPush/cn_config/cn_formal_settings.py

@@ -225,6 +225,15 @@ LOGGING = {
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
+        'customized_push': {
+            'level': 'INFO',
+            'class': 'logging.handlers.RotatingFileHandler',
+            'filename': BASE_DIR + '/static/log/customized_push/info.log',
+            'backupCount': 10,
+            'maxBytes': 1024 * 1024 * 2 * 100,  # 100M
+            'formatter': 'standard',
+            'encoding': 'utf-8',
+        },
     },
     'loggers': {
         'django': {
@@ -247,6 +256,11 @@ LOGGING = {
             'handlers': ['v1_push'],
             'level': 'INFO',
             'propagate': False
+        },
+        'customized_push': {
+            'handlers': ['customized_push'],
+            'level': 'INFO',
+            'propagate': False
         }
     }
 }

+ 14 - 0
AnsjerPush/eur_config/eur_formal_settings.py

@@ -219,6 +219,15 @@ LOGGING = {
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
+        'customized_push': {
+            'level': 'INFO',
+            'class': 'logging.handlers.RotatingFileHandler',
+            'filename': BASE_DIR + '/static/log/customized_push/info.log',
+            'backupCount': 10,
+            'maxBytes': 1024 * 1024 * 2 * 100,  # 100M
+            'formatter': 'standard',
+            'encoding': 'utf-8',
+        },
     },
     'loggers': {
         'django': {
@@ -241,6 +250,11 @@ LOGGING = {
             'handlers': ['v1_push'],
             'level': 'INFO',
             'propagate': False
+        },
+        'customized_push': {
+            'handlers': ['customized_push'],
+            'level': 'INFO',
+            'propagate': False
         }
     }
 }

+ 15 - 1
AnsjerPush/us_config/formal_settings.py

@@ -226,6 +226,15 @@ LOGGING = {
             'formatter': 'standard',
             'encoding': 'utf-8',
         },
+        'customized_push': {
+            'level': 'INFO',
+            'class': 'logging.handlers.RotatingFileHandler',
+            'filename': BASE_DIR + '/static/log/customized_push/info.log',
+            'backupCount': 10,
+            'maxBytes': 1024 * 1024 * 2 * 100,  # 100M
+            'formatter': 'standard',
+            'encoding': 'utf-8',
+        },
     },
     'loggers': {
         'django': {
@@ -249,5 +258,10 @@ LOGGING = {
             'level': 'INFO',
             'propagate': False
         }
-    }
+    },
+        'customized_push': {
+            'handlers': ['customized_push'],
+            'level': 'INFO',
+            'propagate': False
+        }
 }