1
0
Fork 0
forked from github/pelican

change the way logging is done, using the standard log tree instead of

calling the module-level functions on an unitialised logging object.

This allows to
- simplify log.py
- use one logger object for each file
This commit is contained in:
Andrea Crotti 2012-03-20 13:01:21 +00:00
commit 0922efa371
7 changed files with 79 additions and 65 deletions

View file

@ -1,9 +1,13 @@
# -*- coding: utf-8 -*-
import os
from os.path import isabs
import locale
import logging
from os.path import isabs
logger = logging.getLogger(__name__)
from pelican import log
DEFAULT_THEME = os.sep.join([os.path.dirname(os.path.abspath(__file__)),
"themes/notmyidea"])
@ -102,10 +106,10 @@ def read_settings(filename=None):
except locale.Error:
pass
else:
log.warn("LOCALE option doesn't contain a correct value")
logger.warn("LOCALE option doesn't contain a correct value")
if not 'TIMEZONE' in context:
log.warn("No timezone information specified in the settings. Assuming"
logger.warn("No timezone information specified in the settings. Assuming"
" your timezone is UTC for feed generation. Check "
"http://docs.notmyidea.org/alexis/pelican/settings.html#timezone "
"for more information")