Skip to content

Commit

Permalink
Merge pull request #546 from hellohaptik/BB-11092
Browse files Browse the repository at this point in the history
(misc) Update log level from debug to info
  • Loading branch information
saumilhaptik authored Oct 27, 2023
2 parents 6a36df0 + 6b86fb8 commit dff55ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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

0 comments on commit dff55ee

Please sign in to comment.