summaryrefslogtreecommitdiffstats
path: root/lib/umberlog.rst
diff options
context:
space:
mode:
authorGergely Nagy <algernon@madhouse-project.org>2012-04-28 18:18:32 +0200
committerGergely Nagy <algernon@madhouse-project.org>2012-04-28 18:18:32 +0200
commit8cfef10830350c565e8ee917f83b9e97016a0a62 (patch)
tree32406caa5a85df767940c2d9b1fc1c94a8c617dd /lib/umberlog.rst
parent0a00d2b837d186c261d5bc31c08737e60cf4172b (diff)
downloadlibumberlog-8cfef10830350c565e8ee917f83b9e97016a0a62.tar.gz
libumberlog-8cfef10830350c565e8ee917f83b9e97016a0a62.tar.xz
libumberlog-8cfef10830350c565e8ee917f83b9e97016a0a62.zip
Add a closelog() wrapper to clear the environment
Our openlog() wrapper fills in a couple of variables, and those were kept around even after a closelog(), and thus, affected ul_format() calls even after a closelog(). This in turn, made one of the test cases fail, as that was relying on the default behaviour, which was modified due to an openlog() in an earlier test case. We now wrap closelog() aswell, and NULL out our settings to get a clean state, and add a test case to verify this behaviour aswell. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Diffstat (limited to 'lib/umberlog.rst')
-rw-r--r--lib/umberlog.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/umberlog.rst b/lib/umberlog.rst
index c655263..d2cd354 100644
--- a/lib/umberlog.rst
+++ b/lib/umberlog.rst
@@ -7,7 +7,7 @@ CEE-enhanced syslog message generation
--------------------------------------
:Author: Gergely Nagy <algernon@balabit.hu>
-:Date: 2012-03-23
+:Date: 2012-04-28
:Manual section: 3
:Manual group: CEE-enhanced syslog Manual
@@ -19,6 +19,7 @@ SYNOPSIS
#include <umberlog.h>
void ul_openlog (const char *ident, int option, int facility);
+ void ul_closelog (void);
int ul_syslog (int priority, const char *format, ....);
int ul_vsyslog (int priority, const char *format, va_list ap);
@@ -37,6 +38,11 @@ the original **openlog()** function, which opens a connection to the
system logger for a program. The updated version adds support for a
number of new option flags, described below.
+**ul_closelog()** (also aliased to **closelog()**) is similar to
+**ul_openlog()** in that it is a wrapper around the original
+**closelog()**. It clears any settings set so far, to get back to a
+clean state.
+
**ul_legacy_syslog()** and **ul_legacy_vsyslog()** are both thin
layers over the original **syslog()** and **vsyslog()** functions, and
the library overrides the original functions with this two. The only