From c3683662c2d4ef368c4a24d57dd03815a870c343 Mon Sep 17 00:00:00 2001 From: messense Date: Thu, 11 May 2017 11:18:59 +0800 Subject: [PATCH 1/2] Remove timedRotatingFile log config --- docs/sanic/logging.md | 7 ------- sanic/config.py | 18 ------------------ 2 files changed, 25 deletions(-) diff --git a/docs/sanic/logging.md b/docs/sanic/logging.md index be2aa9b3..0fd9c75c 100644 --- a/docs/sanic/logging.md +++ b/docs/sanic/logging.md @@ -76,13 +76,6 @@ By default, log_config parameter is set to use sanic.config.LOGGING dictionary f (Notice that in Docker you have to enable everything by yourself) -- accessTimedRotatingFile (using [logging.handlers.TimedRotatingFileHandler](https://docs.python.org/3/library/logging.handlers.html#logging.handlers.TimedRotatingFileHandler))
- For requests information logging to file with daily rotation support. - - -- errorTimedRotatingFile (using [logging.handlers.TimedRotatingFileHandler](https://docs.python.org/3/library/logging.handlers.html#logging.handlers.TimedRotatingFileHandler))
- For error message and traceback logging to file with daily rotation support. - And `filters`: - accessFilter (using sanic.log.DefaultFilter)
diff --git a/sanic/config.py b/sanic/config.py index 2f2cf49b..8ffdb6c4 100644 --- a/sanic/config.py +++ b/sanic/config.py @@ -77,24 +77,6 @@ LOGGING = { 'filters': ['errorFilter'], 'formatter': 'simple' }, - 'accessTimedRotatingFile': { - 'class': 'logging.handlers.TimedRotatingFileHandler', - 'filters': ['accessFilter'], - 'formatter': 'access', - 'when': 'D', - 'interval': 1, - 'backupCount': 7, - 'filename': 'access.log' - }, - 'errorTimedRotatingFile': { - 'class': 'logging.handlers.TimedRotatingFileHandler', - 'filters': ['errorFilter'], - 'when': 'D', - 'interval': 1, - 'backupCount': 7, - 'filename': 'error.log', - 'formatter': 'simple' - } }, 'loggers': { 'sanic': { From 3ea1b07906572cec5b67dc745f2e16c0c2f76169 Mon Sep 17 00:00:00 2001 From: messense Date: Thu, 11 May 2017 11:19:03 +0800 Subject: [PATCH 2/2] Revert "Add access.log and error.log to .gitignore" This reverts commit fc0d69616c171b50973fffafbe5ef8429f4131ba. --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0549ae86..73e923d3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,3 @@ settings.py docs/_build/ docs/_api/ build/* -access.log -error.log