diff options
author | YmrDtnJu <YmrDtnJu@users.noreply.github.com> | 2018-07-07 20:11:46 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2018-07-11 16:15:59 +0200 |
commit | 5407a6ac4fe1a0d57049530fb144a83ebc1291d9 (patch) | |
tree | 8a2e5e977eebab0bbca6dd0a1c1a77925d3f7b17 | |
parent | 75ef5a12224721b932762d4e8d879745831bea28 (diff) | |
download | util-linux-5407a6ac4fe1a0d57049530fb144a83ebc1291d9.tar.gz |
logger: Define SD_JOURNAL_SUPPRESS_LOCATION.
The normal journald functions add the location in the C source code files to
the log messages. This is nice for a big C based project, but logger is used in
scripts so it would be more useful to let users specify the location in the
script by adding the CODE_FUNC, CODE_FILE and CODE_FILE fields to the log
message.
It is already possible to do this, but it will result in two versions of these
fields: one for the location in logger.c and one for the location in the
script.
-rw-r--r-- | misc-utils/logger.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 846c85273..ebdc56ec2 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -68,6 +68,7 @@ #include <syslog.h> #ifdef HAVE_LIBSYSTEMD +# define SD_JOURNAL_SUPPRESS_LOCATION # include <systemd/sd-daemon.h> # include <systemd/sd-journal.h> #endif |