add doc for customizing logging config

This commit is contained in:
Yun Xu 2017-09-13 18:30:38 -07:00
parent 5cabc9cff2
commit 730f7c5e41

View File

@ -20,6 +20,13 @@ if __name__ == "__main__":
app.run(debug=True, access_log=True) app.run(debug=True, access_log=True)
``` ```
To use your own logging config, simply use `logging.config.dictConfig`, or
pass `log_config` when you initialize `Sanic` app:
```python
app = Sanic('test', log_config=LOGGING_CONFIG)
```
And to close logging, simply assign access_log=False: And to close logging, simply assign access_log=False:
```python ```python