Skip to content

Commit 2f6148b

Browse files
committed
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>
1 parent 2e65669 commit 2f6148b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)