diff --git a/test/logging.c b/test/logging.c index 45d36f2..8305ace 100644 --- a/test/logging.c +++ b/test/logging.c @@ -35,8 +35,9 @@ struct uc_log_modules modules = { int main(int argc, char *argv[]) { - struct uc_log_destination *dest = uc_log_new_stderr(UC_LL_INFO, 0); + struct uc_log_destination *dest; uc_log_init(&modules); + dest = uc_log_new_stderr(UC_LL_INFO, 0); uc_log_add_destination(dest); dest = uc_log_new_file("test.log", UC_LL_INFO, 1); uc_log_add_destination(dest); @@ -55,6 +56,8 @@ int main(int argc, char *argv[]) uc_log_module_set_loglevel(MAIN, UC_LL_WARNING); UC_LOGF( UC_LL_INFO, MAIN, "Test MAIN INFO 3\n" ); + uc_log_delete_destination(dest); + return 1; }