forked from zaclys/searxng
Merge pull request #2448 from Pankwings/logger_warning
use logger.warning
This commit is contained in:
commit
7b2f1079f6
|
@ -95,7 +95,7 @@ def load_engine(engine_data: dict) -> Optional[Engine]:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if engine_name.lower() != engine_name:
|
if engine_name.lower() != engine_name:
|
||||||
logger.warn('Engine name is not lowercase: "{}", converting to lowercase'.format(engine_name))
|
logger.warning('Engine name is not lowercase: "{}", converting to lowercase'.format(engine_name))
|
||||||
engine_name = engine_name.lower()
|
engine_name = engine_name.lower()
|
||||||
engine_data['name'] = engine_name
|
engine_data['name'] = engine_name
|
||||||
|
|
||||||
|
|
|
@ -460,7 +460,7 @@ def build_engine_locales(tag_list: List[str]):
|
||||||
for tag in tag_list:
|
for tag in tag_list:
|
||||||
locale = get_locale(tag)
|
locale = get_locale(tag)
|
||||||
if locale is None:
|
if locale is None:
|
||||||
logger.warn("build_engine_locales: skip locale tag %s / unknown by babel", tag)
|
logger.warning("build_engine_locales: skip locale tag %s / unknown by babel", tag)
|
||||||
continue
|
continue
|
||||||
if locale.territory:
|
if locale.territory:
|
||||||
engine_locales[region_tag(locale)] = tag
|
engine_locales[region_tag(locale)] = tag
|
||||||
|
|
|
@ -74,7 +74,7 @@ class EngineProcessor(ABC):
|
||||||
try:
|
try:
|
||||||
self.engine.init(get_engine_from_settings(self.engine_name))
|
self.engine.init(get_engine_from_settings(self.engine_name))
|
||||||
except SearxEngineResponseException as exc:
|
except SearxEngineResponseException as exc:
|
||||||
self.logger.warn('Fail to initialize // %s', exc)
|
self.logger.warning('Fail to initialize // %s', exc)
|
||||||
except Exception: # pylint: disable=broad-except
|
except Exception: # pylint: disable=broad-except
|
||||||
self.logger.exception('Fail to initialize')
|
self.logger.exception('Fail to initialize')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue