init and destroy logging with thread safety

This commit is contained in:
Paul Dino Jones 2025-10-28 00:26:04 -04:00
parent a98bcbcedb
commit 1c1323961c
1 changed files with 4 additions and 0 deletions

View File

@ -131,6 +131,8 @@ int main(int argc, char** argv)
}
fprintf(stderr, "settings applied\n");
slog_init("monocoque", SLOG_FLAGS_ALL, 1);
slog_config_t slgCfg;
slog_config_get(&slgCfg);
slgCfg.eColorFormat = SLOG_COLORING_TAG;
@ -173,6 +175,7 @@ int main(int argc, char** argv)
{
fprintf(stderr, "%s:%d - %s\n", config_error_file(&cfg), config_error_line(&cfg), config_error_text(&cfg));
config_destroy(&cfg);
slog_destroy();
goto cleanup_final;
}
else
@ -311,6 +314,7 @@ int main(int argc, char** argv)
freesound();
}
}
slog_destroy();
}