Remove sanic.log module

This commit is contained in:
messense 2017-02-25 12:49:24 +08:00
parent 4cd3b89394
commit 8bdbf0ab6b
No known key found for this signature in database
GPG Key ID: BB41A8A2C716CCA9
4 changed files with 9 additions and 6 deletions

View File

@ -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')

View File

@ -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("/")

View File

@ -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')

View File

@ -1,3 +0,0 @@
import logging
log = logging.getLogger('sanic')