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:
parent
522cbd468c
commit
31e1cb0706
@ -32,6 +32,16 @@ if 'DJANGO_PROJECT_PATH' in config:
|
|||||||
else:
|
else:
|
||||||
sys.stderr.write('"DJANGO_PROJECT_PATH" is missing in config\n')
|
sys.stderr.write('"DJANGO_PROJECT_PATH" is missing in config\n')
|
||||||
sys.exit(1)
|
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
|
# we want open urls through proxy
|
||||||
if 'proxyurl' in config:
|
if 'proxyurl' in config:
|
||||||
|
Loading…
Reference in New Issue
Block a user