Remove sanic.log module
This commit is contained in:
parent
4cd3b89394
commit
8bdbf0ab6b
|
@ -9,16 +9,17 @@ If you want more info about the package check
|
||||||
https://github.com/argaen/aiocache
|
https://github.com/argaen/aiocache
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
import aiocache
|
import aiocache
|
||||||
|
|
||||||
from sanic import Sanic
|
from sanic import Sanic
|
||||||
from sanic.response import json
|
from sanic.response import json
|
||||||
from sanic.log import log
|
|
||||||
from aiocache import cached
|
from aiocache import cached
|
||||||
from aiocache.serializers import JsonSerializer
|
from aiocache.serializers import JsonSerializer
|
||||||
|
|
||||||
app = Sanic(__name__)
|
app = Sanic(__name__)
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.listener('before_server_start')
|
@app.listener('before_server_start')
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import os
|
import os
|
||||||
|
import logging
|
||||||
|
|
||||||
from sanic import Sanic
|
from sanic import Sanic
|
||||||
from sanic.log import log
|
|
||||||
from sanic.response import json, text, file
|
from sanic.response import json, text, file
|
||||||
from sanic.exceptions import ServerError
|
from sanic.exceptions import ServerError
|
||||||
|
|
||||||
app = Sanic(__name__)
|
app = Sanic(__name__)
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
|
import logging
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
|
|
||||||
from sanic.log import log
|
|
||||||
from sanic.app import Sanic
|
from sanic.app import Sanic
|
||||||
|
|
||||||
|
|
||||||
|
log = logging.getLogger('sanic')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = ArgumentParser(prog='sanic')
|
parser = ArgumentParser(prog='sanic')
|
||||||
parser.add_argument('--host', dest='host', type=str, default='127.0.0.1')
|
parser.add_argument('--host', dest='host', type=str, default='127.0.0.1')
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
import logging
|
|
||||||
|
|
||||||
log = logging.getLogger('sanic')
|
|
Loading…
Reference in New Issue
Block a user