Skip to content

Commit

Permalink
[mod] one logger per engine
Browse files Browse the repository at this point in the history
Suggested-by: @dalf in #98 (comment)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
  • Loading branch information
return42 committed Sep 6, 2021
1 parent a26e4ef commit 7b235a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manage
Expand Up @@ -37,7 +37,7 @@ PYLINT_SEARX_DISABLE_OPTION="\
I,C,R,\
W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
E1136"
PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES="supported_languages,language_aliases"
PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES="supported_languages,language_aliases,logger"
PYLINT_OPTIONS="-m pylint -j 0 --rcfile .pylintrc"

help() {
Expand Down Expand Up @@ -588,6 +588,7 @@ test.pylint() {
( set -e
build_msg TEST "[pylint] \$PYLINT_FILES"
pyenv.cmd python ${PYLINT_OPTIONS} ${PYLINT_VERBOSE} \
--additional-builtins="${PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES}" \
"${PYLINT_FILES[@]}"

build_msg TEST "[pylint] searx/engines"
Expand Down
1 change: 1 addition & 0 deletions searx/engines/__init__.py
Expand Up @@ -111,6 +111,7 @@ def load_engine(engine_data):
if is_missing_required_attributes(engine):
return None

engine.logger = logger.getChild(engine_name)
return engine


Expand Down

0 comments on commit 7b235a1

Please sign in to comment.