@@ -15,9 +15,9 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
15(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
15(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
18from os import environ
19from os import environ
19from os.path import realpath, dirname, join, abspath
20from os.path import realpath, dirname, join, abspath
20−from searx.https_rewrite import load_https_rules
22 from yaml import load
22 from yaml import load
@@ -45,7 +45,17 @@ else:
45with open(settings_path) as settings_yaml:
45with open(settings_path) as settings_yaml:
46 settings = load(settings_yaml)
46 settings = load(settings_yaml)
48+if settings.get('server', {}).get('debug'):
49+ logging.basicConfig(level=logging.DEBUG)
51+ logging.basicConfig(level=logging.WARNING)
53+logger = logging.getLogger('searx')
48# load https rules only if https rewrite is enabled
55# load https rules only if https rewrite is enabled
49if settings.get('server', {}).get('https_rewrite'):
56if settings.get('server', {}).get('https_rewrite'):
50 # loade https rules
57 # loade https rules
58+ from searx.https_rewrite import load_https_rules
51 load_https_rules(https_rewrite_path)
59 load_https_rules(https_rewrite_path)
61+logger.info('Initialisation done')