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

View File

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