diff options
| author | Miloslav Trmač <mitr@redhat.com> | 2012-07-24 13:22:27 +0200 |
|---|---|---|
| committer | Miloslav Trmač <mitr@redhat.com> | 2012-07-30 07:18:51 +0200 |
| commit | 58bc54dc373c4f2f710531b379c32f15e25d41eb (patch) | |
| tree | b0ec62578047e6517edb4af63fe1d5c44a90a19e | |
| parent | 13dd8375af0dac1eac0132e1962f4edc5124d1b8 (diff) | |
| download | libumberlog-58bc54dc373c4f2f710531b379c32f15e25d41eb.tar.gz libumberlog-58bc54dc373c4f2f710531b379c32f15e25d41eb.tar.xz libumberlog-58bc54dc373c4f2f710531b379c32f15e25d41eb.zip | |
Don't reset facility on closelog()
This is not defined by closelog(3p), and the BSD implementation doesn't
do it either.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| -rw-r--r-- | lib/umberlog.c | 3 | ||||
| -rw-r--r-- | t/test_umberlog.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/umberlog.c b/lib/umberlog.c index ff9481c..5fb9710 100644 --- a/lib/umberlog.c +++ b/lib/umberlog.c @@ -117,9 +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.facility = LOG_USER; - pthread_mutex_unlock (&ul_process_data.lock); } /** HELPERS **/ diff --git a/t/test_umberlog.c b/t/test_umberlog.c index c3fdac8..6bf1701 100644 --- a/t/test_umberlog.c +++ b/t/test_umberlog.c @@ -253,11 +253,11 @@ START_TEST (test_closelog) openlog ("umberlog/test_closelog", LOG_UL_NODISCOVER, LOG_LOCAL0); closelog (); - msg = ul_format (LOG_LOCAL1 | LOG_DEBUG, "%s", __FUNCTION__, NULL); + msg = ul_format (LOG_DEBUG, "%s", __FUNCTION__, NULL); jo = parse_msg (msg); free (msg); - verify_value (jo, "facility", "local1"); + verify_value (jo, "facility", "local0"); json_object_put (jo); } |
