lib: Add ot_journal_* helper macros

Rather than wrapping each instance of `sd_journal_*` with
`HAVE_SYSTEMD`, let's just add some convenience macros that are just
no-op if we're not compiling with systemd.

Closes: #1841
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon authored and Atomic Bot committed 2019-04-24 21:38:24 +00:00
1 parent d69214ade3
commit 5464535205
4 files changed
+14 -16

No files matched your search

+1 -1
View File
@@ -4655,7 +4655,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
g_autofree char *formatted_xferred = g_format_size (bytes_transferred);
g_string_append_printf (msg, "\ntransfer: secs: %u size: %s", n_seconds, formatted_xferred);
sd_journal_send ("MESSAGE=%s", msg->str,
ot_journal_send ("MESSAGE=%s", msg->str,
"MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(OSTREE_MESSAGE_FETCH_COMPLETE_ID),
"OSTREE_REMOTE=%s", pull_data->remote_name,
"OSTREE_GPG=%s", gpg_verify_state,