Disable sanic logo

This commit is contained in:
Marcin Baran 2017-01-09 16:59:25 +01:00
parent d93da2c1a6
commit 4f40e9ee71
2 changed files with 15 additions and 2 deletions

View File

@ -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())
```

View File

@ -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 = {}