From a27471178a849976ec0a9216a9c138482ae65f28 Mon Sep 17 00:00:00 2001 From: suoning <630571017@qq.com> Date: Mon, 15 May 2017 10:25:19 +0800 Subject: [PATCH 1/3] update logger doc --- docs/sanic/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sanic/logging.md b/docs/sanic/logging.md index 0fd9c75c..332d805f 100644 --- a/docs/sanic/logging.md +++ b/docs/sanic/logging.md @@ -14,7 +14,7 @@ from sanic.config import LOGGING # The default logging handlers are ['accessStream', 'errorStream'] # but we change it to use other handlers here for demo purpose LOGGING['loggers']['network']['handlers'] = [ - 'accessTimedRotatingFile', 'errorTimedRotationgFile'] + 'accessTimedRotatingFile', 'errorTimedRotatingFile'] app = Sanic('test') From 68d4bb6ffeb70d30a8298c845a81cc070093bd9f Mon Sep 17 00:00:00 2001 From: suoning <630571017@qq.com> Date: Mon, 15 May 2017 10:54:30 +0800 Subject: [PATCH 2/3] update logging doc --- docs/sanic/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sanic/logging.md b/docs/sanic/logging.md index 332d805f..c416b9f8 100644 --- a/docs/sanic/logging.md +++ b/docs/sanic/logging.md @@ -14,7 +14,7 @@ from sanic.config import LOGGING # The default logging handlers are ['accessStream', 'errorStream'] # but we change it to use other handlers here for demo purpose LOGGING['loggers']['network']['handlers'] = [ - 'accessTimedRotatingFile', 'errorTimedRotatingFile'] + 'accessSysLog', 'errorSysLog'] app = Sanic('test') From dddce3f30d02dc29988da79e59b56f8bd38ae42e Mon Sep 17 00:00:00 2001 From: suoning <630571017@qq.com> Date: Mon, 15 May 2017 13:59:03 +0800 Subject: [PATCH 3/3] update logging, Remove the comments --- docs/sanic/logging.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/sanic/logging.md b/docs/sanic/logging.md index c416b9f8..fa1dc171 100644 --- a/docs/sanic/logging.md +++ b/docs/sanic/logging.md @@ -26,8 +26,6 @@ if __name__ == "__main__": app.run(log_config=LOGGING) ``` -After the program starts, it will log down all the information/requests in access.log and error.log in your working directory. - And to close logging, simply assign log_config=None: ```python