Skip to content

Commit cdb21de

Browse files
bastelfreakOpenVoxProjectBot
authored andcommitted
sd_notify: Add log message
This logs whenever we call sd_notify, the socket path and the actual message we write. This is incredibly helpful when debugging systemd behaviour. Signed-off-by: Tim Meusel <tim@bastelfreak.de> (cherry picked from commit 39f257c)
1 parent d3450b7 commit cdb21de

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
[org.openvoxproject/i18n ~i18n-version]]
110110

111111
:eastwood {:ignored-faults {:reflection {puppetlabs.trapperkeeper.logging [{:line 92}]
112-
puppetlabs.trapperkeeper.internal [{:line 174}]
112+
puppetlabs.trapperkeeper.internal [{:line 177}]
113113
puppetlabs.trapperkeeper.testutils.logging true
114114
puppetlabs.trapperkeeper.testutils.logging-test true
115115
puppetlabs.trapperkeeper.services.nrepl.nrepl-service-test true

src/puppetlabs/trapperkeeper/internal.clj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
"Send a message to systemd NOTIFY_SOCKET if available."
6262
[^String message]
6363
(when-let [^String socket-path systemd-notify-socket]
64+
(log/info (i18n/trs "Sending sd_notify message to NOTIFY_SOCKET {0}: {1}"
65+
(pr-str socket-path)
66+
(pr-str message)))
6467
(let [^AFUNIXSocketAddress addr (socket-addr socket-path)]
6568
(with-open [^AFUNIXDatagramSocket s (AFUNIXDatagramSocket/newInstance)]
6669
(try

0 commit comments

Comments
 (0)