Fix test/logging.c
This commit is contained in:
+4
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user