Bug Fix: Replace printf to log_msg

This commit is contained in:
Davidson Francis 2024-08-03 17:15:35 -03:00
parent db858ecdf8
commit b9d2587f20
2 changed files with 11 additions and 16 deletions

View File

@ -405,17 +405,14 @@ int init_environment_events(void)
}
log_msg("Environment events summary:\n");
for (int i = 0; i < num_env_events; i++) {
printf(
"EVENT%d_MATCH_TYPE: %s\n"
"EVENT%d_MATCH_STR: %s\n"
"EVENT%d_NOTIFIER: %s\n"
"EVENT%d_MASK_MSG: %s\n\n",
i, match_types[env_events[i].ev_match_type],
i, env_events[i].ev_match_str,
i, notifiers_str[env_events[i].ev_notifier_idx],
i, env_events[i].ev_mask_msg
);
for (int i = 0; i < num_env_events; i++)
{
log_msg("EVENT%d_MATCH_TYPE: %s\n", i,
match_types[env_events[i].ev_match_type]);
log_msg("EVENT%d_MATCH_STR: %s\n", i, env_events[i].ev_match_str);
log_msg("EVENT%d_NOTIFIER: %s\n", i,
notifiers_str[env_events[i].ev_notifier_idx]);
log_msg("EVENT%d_MASK_MSG: %s\n\n", i, env_events[i].ev_mask_msg);
/* Try to setup notifier if not yet. */
self = &notifiers[env_events[i].ev_notifier_idx];

View File

@ -166,11 +166,9 @@ int init_static_events(void)
if (!static_events[i].enabled)
continue;
printf(
"STATIC_EVENT%d : enabled\n"
"STATIC_EVENT%d_NOTIFIER: %s\n\n",
i, i, notifiers_str[static_events[i].ev_notifier_idx]
);
log_msg("STATIC_EVENT%d : enabled\n", i);
log_msg("STATIC_EVENT%d_NOTIFIER: %s\n\n",
i, notifiers_str[static_events[i].ev_notifier_idx]);
/* Try to setup notifier if not yet. */
self = &notifiers[static_events[i].ev_notifier_idx];