diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2015-01-09 04:13:05 +0100 |
|---|---|---|
| committer | Adam Tauber <asciimoo@gmail.com> | 2015-01-09 04:13:05 +0100 |
| commit | 299a80a1eb2eecb80f5c50da261a9eab1900b572 (patch) | |
| tree | 89cacdaa961788e86cfe3ec228b0b66ee77eb438 /searx/https_rewrite.py | |
| parent | 425a576f28e1afd3d8e65097ecfe225a25d9eafb (diff) | |
[enh] using the logger
Diffstat (limited to 'searx/https_rewrite.py')
| -rw-r--r-- | searx/https_rewrite.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/searx/https_rewrite.py b/searx/https_rewrite.py index d873b406d..71aec1c9b 100644 --- a/searx/https_rewrite.py +++ b/searx/https_rewrite.py @@ -20,8 +20,11 @@ from urlparse import urlparse from lxml import etree from os import listdir from os.path import isfile, isdir, join +from searx import logger +logger = logger.getChild("https_rewrite") + # https://gitweb.torproject.org/\ # pde/https-everywhere.git/tree/4.0:/src/chrome/content/rules @@ -131,7 +134,7 @@ def load_single_https_ruleset(filepath): def load_https_rules(rules_path): # check if directory exists if not isdir(rules_path): - print("[E] directory not found: '" + rules_path + "'") + logger.error("directory not found: '" + rules_path + "'") return # search all xml files which are stored in the https rule directory @@ -151,7 +154,7 @@ def load_https_rules(rules_path): # append ruleset https_rules.append(ruleset) - print(' * {n} https-rules loaded'.format(n=len(https_rules))) + logger.info('{n} rules loaded'.format(n=len(https_rules))) def https_url_rewrite(result): |