From 31e1cb07062602bd5320da80ba353f9d32064562 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Sat, 30 Oct 2010 17:53:39 +0000 Subject: [PATCH] py-i2phosts-fetcher: add logger using our get_logger() --- py-i2phosts-fetcher | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/py-i2phosts-fetcher b/py-i2phosts-fetcher index 8211bfc..24a1c95 100755 --- a/py-i2phosts-fetcher +++ b/py-i2phosts-fetcher @@ -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: