fix No handlers could be found for logger "linkdrop.lib.helpers", dont import log use before configuring app

change logger var name to log to match our nameing elsewhere
This commit is contained in:
Shane Caraveo 2010-11-24 14:11:47 -08:00
Родитель 36ffaedf17
Коммит b6a5d4c5c1
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -35,7 +35,6 @@ from migrate.versioning.util import load_model
from migrate.versioning import exceptions, genmodel, schemadiff, schema
import linkdrop.lib.app_globals as app_globals
import linkdrop.lib.helpers
from linkdrop.config.routing import make_map
from linkdrop.model import init_model, meta
@ -66,7 +65,9 @@ def load_environment(global_conf, app_conf):
config.init_app(global_conf, app_conf, package='linkdrop', paths=paths)
config['routes.map'] = make_map(config)
config['pylons.app_globals'] = app_globals.Globals(config)
config['pylons.h'] = linkdrop.lib.helpers
import linkdrop.lib.helpers as h
config['pylons.h'] = h
# Setup cache object as early as possible
import pylons

Просмотреть файл

@ -38,7 +38,7 @@ import logging
from linkdrop.model.meta import Session
logger=logging.getLogger(__name__)
log = logging.getLogger(__name__)
## {{{ http://code.activestate.com/recipes/52281/ (r1) PSF License
@ -119,7 +119,7 @@ def json_exception_response(func, *args, **kwargs):
except HTTPException:
raise
except Exception, e:
logger.exception("%s(%s, %s) failed", func, args, kwargs)
log.exception("%s(%s, %s) failed", func, args, kwargs)
#pylons = get_pylons(args)
#pylons.response.status_int = 500
return {