Skip to content
Snippets Groups Projects
Commit f25aefd8 authored by Morris Jette's avatar Morris Jette
Browse files

jobcomp/elasticsearch: reduce verbose logging

Avoid logging every time that some interaction with the elasticsearch
server happens. That would generate too many log messages.
Fix allignment problem in the code without changing logic.
parent 0a499a2e
No related branches found
No related tags found
No related merge requests found
...@@ -406,10 +406,12 @@ static int _index_job(const char *jobcomp) ...@@ -406,10 +406,12 @@ static int _index_job(const char *jobcomp)
(void) strtok(token, ":"); (void) strtok(token, ":");
token = strtok(NULL, ":"); token = strtok(NULL, ":");
if (slurm_get_debug_flags() & if (slurm_get_debug_flags() &
DEBUG_FLAG_ESEARCH) DEBUG_FLAG_ESEARCH) {
info("%s: Job with jobid %s" info("%s: Job with jobid %s "
" indexed into elasticsearch", "indexed into "
plugin_type, token); "elasticsearch",
plugin_type, token);
}
} }
xfree(response); xfree(response);
} }
...@@ -901,10 +903,11 @@ extern void *_process_jobs(void *x) ...@@ -901,10 +903,11 @@ extern void *_process_jobs(void *x)
wait_retry_cnt++; wait_retry_cnt++;
} }
list_iterator_destroy(iter); list_iterator_destroy(iter);
if (success_cnt || fail_cnt) { if ((success_cnt || fail_cnt) &&
info("%s: index success:%d " (slurm_get_debug_flags() & DEBUG_FLAG_ESEARCH)) {
"fail/wait_retry:%d", plugin_type, info("%s: index success:%d fail:%d wait_retry:%d",
success_cnt, fail_cnt + wait_retry_cnt); plugin_type, success_cnt, fail_cnt,
wait_retry_cnt);
} }
} }
return NULL; return NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment