Utility
sanic.compat
- class sanic.compat.Header
Bases:
multidict._multidict.CIMultiDict
Container used for both request and response headers. It is a subclass of CIMultiDict.
It allows for multiple values for a single key in keeping with the HTTP spec. Also, all keys are case in-sensitive.
Please checkout the MultiDict documentation for more details about how to use the object. In general, it should work very similar to a regular dictionary.
- get_all(key)
Convenience method mapped to
getall()
.- Parameters
key (str) –
sanic.log
- sanic.log.access_logger = <Logger sanic.access (WARNING)>
Logger used by Sanic for access logging
- sanic.log.error_logger = <Logger sanic.error (WARNING)>
Logger used by Sanic for error logging
- sanic.log.logger = <Logger sanic.root (WARNING)>
General Sanic logger