Fix test/logging.c

This commit is contained in:
Nils O. Selåsdal
2013-05-31 03:45:28 +02:00
parent af8cab5034
commit 1b43ef0299
+4 -1
View File
@@ -35,8 +35,9 @@ struct uc_log_modules modules = {
int main(int argc, char *argv[]) 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); uc_log_init(&modules);
dest = uc_log_new_stderr(UC_LL_INFO, 0);
uc_log_add_destination(dest); uc_log_add_destination(dest);
dest = uc_log_new_file("test.log", UC_LL_INFO, 1); dest = uc_log_new_file("test.log", UC_LL_INFO, 1);
uc_log_add_destination(dest); 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_log_module_set_loglevel(MAIN, UC_LL_WARNING);
UC_LOGF( UC_LL_INFO, MAIN, "Test MAIN INFO 3\n" ); UC_LOGF( UC_LL_INFO, MAIN, "Test MAIN INFO 3\n" );
uc_log_delete_destination(dest);
return 1; return 1;
} }