summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-01-10 10:54:55 +0100
committerGravatar Christian Hesse <mail@eworm.de>2018-01-10 10:54:55 +0100
commit287982fc344b992e72e3c117769c4e0b153e6601 (patch)
tree98c645441b01cd1ad419c6dc5c65139fb21fb98a
parent5faa6b578150539d538768178e6eac99ebf5787b (diff)
downloadudp514-journal-287982fc344b992e72e3c117769c4e0b153e6601.tar.gz
udp514-journal-287982fc344b992e72e3c117769c4e0b153e6601.tar.zst
set SYSLOG_IDENTIFIER to ip address
... and drop field IP_ADDRESS instead.
-rw-r--r--udp514-journal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udp514-journal.c b/udp514-journal.c
index 0ed80d7..57553bf 100644
--- a/udp514-journal.c
+++ b/udp514-journal.c
@@ -46,8 +46,8 @@ int main(int argc, char **argv) {
}
/* send to systemd-journald */
- sd_journal_send("MESSAGE=%s: %s", inet_ntoa(cliAddr.sin_addr), buffer,
- "IP_ADDRESS=%s", inet_ntoa(cliAddr.sin_addr),
+ sd_journal_send("MESSAGE=%s", buffer,
+ "SYSLOG_IDENTIFIER=%s", inet_ntoa(cliAddr.sin_addr),
NULL);
/* count and update status */