summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGergely Nagy <algernon@balabit.hu>2012-08-11 01:06:55 +0200
committerGergely Nagy <algernon@balabit.hu>2012-08-11 01:06:55 +0200
commitfbeba09ae5050ef0adf2791b9d1a29993e9f6658 (patch)
tree31c56e0599a72184b3835a5f0f5cf48e640db026 /lib
parent1c707ea147d40ff2119b430512fe4e45c564ce32 (diff)
downloadlibumberlog-fbeba09ae5050ef0adf2791b9d1a29993e9f6658.tar.gz
libumberlog-fbeba09ae5050ef0adf2791b9d1a29993e9f6658.tar.xz
libumberlog-fbeba09ae5050ef0adf2791b9d1a29993e9f6658.zip
LOG_UL_NODISCOVER => LOG_UL_NOIMPLICIT
Based on a suggestion by Miloslav Trmač <mitr@redhat.com>, rename LOG_UL_NODISCOVER to LOG_UL_NOIMPLICIT, and clarify the documentation slightly. Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Diffstat (limited to 'lib')
-rw-r--r--lib/umberlog.c8
-rw-r--r--lib/umberlog.h2
-rw-r--r--lib/umberlog.rst21
3 files changed, 16 insertions, 15 deletions
diff --git a/lib/umberlog.c b/lib/umberlog.c
index b64d715..e0ce093 100644
--- a/lib/umberlog.c
+++ b/lib/umberlog.c
@@ -79,7 +79,7 @@ static struct
{
PTHREAD_MUTEX_INITIALIZER,
#if __UL_PRELOAD__
- DEFAULT_DISCOVER_FLAGS,
+ DEFAULT_LOG_FLAGS,
#else
LOG_UL_ALL,
#endif
@@ -109,9 +109,9 @@ ul_finish (void)
static void
_ul_reset_caches_locked (void)
{
- /* If either NODISCOVER or NOCACHE is set, don't cache stuff we
+ /* If either NOIMPLICIT or NOCACHE is set, don't cache stuff we
won't use. */
- if ((ul_process_data.flags & (LOG_UL_NODISCOVER | LOG_UL_NOCACHE)) != 0)
+ if ((ul_process_data.flags & (LOG_UL_NOIMPLICIT | LOG_UL_NOCACHE)) != 0)
{
ul_process_data.pid = -1;
ul_process_data.gid = -1;
@@ -560,7 +560,7 @@ _ul_discover (ul_buffer_t *buffer, int priority)
char hostname_buffer[_POSIX_HOST_NAME_MAX + 1];
const char *ident;
- if (ul_process_data.flags & LOG_UL_NODISCOVER)
+ if (ul_process_data.flags & LOG_UL_NOIMPLICIT)
return buffer;
buffer = _ul_json_append (buffer,
diff --git a/lib/umberlog.h b/lib/umberlog.h
index 85f7b6e..2a0d08b 100644
--- a/lib/umberlog.h
+++ b/lib/umberlog.h
@@ -32,7 +32,7 @@
#include <stdarg.h>
#define LOG_UL_ALL 0x0000
-#define LOG_UL_NODISCOVER 0x0040
+#define LOG_UL_NOIMPLICIT 0x0040
#define LOG_UL_NOCACHE 0x0080
#define LOG_UL_NOCACHE_UID 0x0100
#define LOG_UL_NOTIME 0x0200
diff --git a/lib/umberlog.rst b/lib/umberlog.rst
index 7c3af99..65c824b 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-08-10
+:Date: 2012-08-11
:Manual section: 3
:Manual group: CEE-enhanced syslog Manual
@@ -88,7 +88,7 @@ ones and the new ones too turn the original syslog message into a
CEE-enabled JSON payload, with the original message put into the *msg*
field, and any additional fields put into the same structure.
-By default, unless the **LOG_UL_NODISCOVER** option flag is set, all
+By default, unless the **LOG_UL_NOIMPLICIT** option flag is set, all
of these functions will also add a few automatically discovered fields
into the payload:
@@ -128,22 +128,23 @@ LOG_UL_ALL
setting for the linkable library, but for the LD_PRELOAD variant, it
can be changed at the library's configure time.
-LOG_UL_NODISCOVER
- Disable all automatic discovery, and only include the *message*,
- and any specified *key-value* pairs in the generated message.
+LOG_UL_NOIMPLICIT
+ Disable adding any automatic discovered fields implicitly, and only
+ include the *message*, and any specified *key-value* pairs in the
+ generated message.
LOG_UL_NOCACHE
- When automatic discovery is enabled, disable caching certain
- properties, that might change between the call to **openlog()** and
- the **ul_syslog()** invocation.
+ When implict fields are enabled, disable caching certain properties,
+ that might change between the call to **openlog()** and the
+ **ul_syslog()** invocation.
LOG_UL_NOCACHE_UID
- Disable the *uid* and *gid* caching when automatic discovery is
+ Disable the *uid* and *gid* caching when implicit fields are
enabled, but do cache the rest.
LOG_UL_NOTIME
Do not add a high-precision timestamp to the generated message when
- automatic discovery is enabled.
+ implicit fields are enabled.
EXAMPLES
========