@@ -22,6 +22,10 @@ from imp import load_source
2222from flask.ext.babel import gettext
2323from operator import itemgetter
2424from searx import settings
25+from searx import logger
26+
27+
28+logger = logger.getChild('engines')
2529
2630engine_dir = dirname(realpath(__file__))
2731
@@ -81,7 +85,7 @@ def load_engine(engine_data):
8185 if engine_attr.startswith('_'):
8286 continue
8387 if getattr(engine, engine_attr) is None:
84− print('[E] Engine config error: Missing attribute "{0}.{1}"'
88+ logger.error('Missing engine config attribute: "{0}.{1}"'
8589 .format(engine.name, engine_attr))
8690 sys.exit(1)
8791
@@ -100,9 +104,8 @@ def load_engine(engine_data):
100104 categories['general'].append(engine)
101105
102106 if engine.shortcut:
103− # TODO check duplications
104107 if engine.shortcut in engine_shortcuts:
105− print('[E] Engine config error: ambigious shortcut: {0}'
108+ logger.error('Engine config error: ambigious shortcut: {0}'
106109 .format(engine.shortcut))
107110 sys.exit(1)
108111 engine_shortcuts[engine.shortcut] = engine.name
@@ -199,7 +202,7 @@ def get_engines_stats():
199202
200203
201204if 'engines' not in settings or not settings['engines']:
202− print '[E] Error no engines found. Edit your settings.yml'
205+ logger.error('No engines found. Edit your settings.yml')
203206 exit(2)
204207
205208for engine_data in settings['engines']: