Disable sanic logo
This commit is contained in:
parent
d93da2c1a6
commit
4f40e9ee71
|
@ -32,4 +32,17 @@ like so:
|
|||
```python
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=1337, workers=4)
|
||||
```
|
||||
|
||||
## Disable Sanic logo
|
||||
|
||||
```python
|
||||
from sanic.config import Config
|
||||
|
||||
|
||||
class MyConfig(Config):
|
||||
LOGO = ''
|
||||
|
||||
|
||||
app = Sanic(__name__, config=MyConfig())
|
||||
```
|
|
@ -21,7 +21,7 @@ from os import set_inheritable
|
|||
|
||||
class Sanic:
|
||||
def __init__(self, name=None, router=None,
|
||||
error_handler=None, logger=None):
|
||||
error_handler=None, logger=None, config=None):
|
||||
if logger is None:
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
|
@ -33,7 +33,7 @@ class Sanic:
|
|||
self.name = name
|
||||
self.router = router or Router()
|
||||
self.error_handler = error_handler or Handler(self)
|
||||
self.config = Config()
|
||||
self.config = config or Config()
|
||||
self.request_middleware = deque()
|
||||
self.response_middleware = deque()
|
||||
self.blueprints = {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user