summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/umberlog.c1
-rw-r--r--t/test_umberlog.c11
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/umberlog.c b/lib/umberlog.c
index e06f87a..e336ac3 100644
--- a/lib/umberlog.c
+++ b/lib/umberlog.c
@@ -117,7 +117,6 @@ ul_closelog (void)
old_closelog ();
memset (&ul_thread_data, 0, sizeof (ul_thread_data));
pthread_mutex_lock (&ul_process_data.lock);
- ul_process_data.flags = 0;
ul_process_data.ident = NULL;
pthread_mutex_unlock (&ul_process_data.lock);
}
diff --git a/t/test_umberlog.c b/t/test_umberlog.c
index 2548001..fdc48dc 100644
--- a/t/test_umberlog.c
+++ b/t/test_umberlog.c
@@ -257,6 +257,17 @@ START_TEST (test_closelog)
jo = parse_msg (msg);
free (msg);
+ verify_value_missing (jo, "facility");
+
+ json_object_put (jo);
+
+ openlog ("umberlog/test_closelog", 0, LOG_LOCAL0);
+ closelog ();
+
+ msg = ul_format (LOG_DEBUG, "%s", __FUNCTION__, NULL);
+ jo = parse_msg (msg);
+ free (msg);
+
verify_value (jo, "facility", "local0");
#ifdef HAVE_PROGRAM_INVOCATION_SHORT_NAME
verify_value (jo, "program", "test_umberlog");