Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(misc) Update log level from debug to info #546

Merged
merged 3 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ner_v2/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def text(request):

try:
validate_text_request(request)
ner_logger.debug("Valid text request")
ner_logger.info("Valid text request")
# if verify success get detection data
data = get_text_entity_detection_data(request)
except InvalidTextRequest as err:
Expand Down
2 changes: 2 additions & 0 deletions ner_v2/detectors/textual/elastic_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def get_multi_entity_results(self, entities, texts, fuzziness_threshold=1,
('TMOS', 'TMOS'), ('G.', 'G Pulla Reddy Sweets')])}
]
"""
ner_logger.info(f'[get_multi_entity_results] entities {entities}')
# entities for which es results need to be logged for debugging purposes
log_results_for_entities = ['nsdc_language_select',
'nsdc_choose_topik',
Expand Down Expand Up @@ -158,6 +159,7 @@ def get_multi_entity_results(self, entities, texts, fuzziness_threshold=1,
try:
response = self._run_es_search(self._default_connection, **kwargs)
results = _parse_multi_entity_es_results(response.get("responses"))
ner_logger.info(f'[ES Result for Entities] log_es_result: {log_es_result}')
if log_es_result:
ner_logger.info(f'[ES Result for Entities] result: {results}')
ner_logger.info(f'[ES Result for Entities] kwargs: {kwargs}')
Expand Down
2 changes: 1 addition & 1 deletion ner_v2/detectors/textual/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def get_text_entity_detection_data(request):
entities = request_data.get("entities", {})
target_language_script = request_data.get('language_script') or ENGLISH_LANG
source_language = request_data.get('source_language') or ENGLISH_LANG
ner_logger.debug(f"Request entity data {entities}")
ner_logger.info(f"Request entity data {entities}")

data = []

Expand Down