1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-01-08 22:07:55 +00:00

py-i2phosts-fetcher: add logger using our get_logger()

This commit is contained in:
Hidden Z 2010-10-30 17:53:39 +00:00
parent 522cbd468c
commit 31e1cb0706

View File

@ -32,6 +32,16 @@ if 'DJANGO_PROJECT_PATH' in config:
else:
sys.stderr.write('"DJANGO_PROJECT_PATH" is missing in config\n')
sys.exit(1)
from web.lib.utils import get_logger
# configure logger
if args.debug == True:
log_level = 'debug'
log_file = None
else:
log_level = config['log_level']
log_file = config['log_file']
log = get_logger(filename=log_file, log_level=log_level)
# we want open urls through proxy
if 'proxyurl' in config: