add doc for customizing logging config
This commit is contained in:
parent
5cabc9cff2
commit
730f7c5e41
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user