lib: Use sd_journal directly (optionally)
This was the last caller of libgsystem that isn't `gs_file_get_path_cached()`. I think the use case ostree has where the same code can be called via command line and via a shared library *and* via a daemon is rather unusual, so let's just copy the code for logging from libgsystem into here. For example rpm-ostree hard depends on a daemon mode, so it'll just use `sd_journal` directly. Closes: #341 Approved by: jlebon
This commit is contained in:
1 parent
4819b44189
commit
9e2763106b
8 files changed
+216
-10
No files matched your search
@@ -473,7 +473,7 @@ merge_etc_changes (GFile *orig_etc,
|
||||
goto out;
|
||||
}
|
||||
|
||||
gs_log_structured_print_id_v (OSTREE_CONFIGMERGE_ID,
|
||||
ot_log_structured_print_id_v (OSTREE_CONFIGMERGE_ID,
|
||||
"Copying /etc changes: %u modified, %u removed, %u added",
|
||||
modified->len,
|
||||
removed->len,
|
||||
@@ -773,7 +773,7 @@ selinux_relabel_var_if_needed (OstreeSysroot *sysroot,
|
||||
|
||||
if (!g_file_query_exists (deployment_var_labeled, NULL))
|
||||
{
|
||||
gs_log_structured_print_id_v (OSTREE_VARRELABEL_ID,
|
||||
ot_log_structured_print_id_v (OSTREE_VARRELABEL_ID,
|
||||
"Relabeling /var (no stamp file '%s' found)",
|
||||
gs_file_get_path_cached (deployment_var_labeled));
|
||||
|
||||
@@ -1927,7 +1927,7 @@ ostree_sysroot_write_deployments (OstreeSysroot *self,
|
||||
}
|
||||
}
|
||||
|
||||
gs_log_structured_print_id_v (OSTREE_DEPLOYMENT_COMPLETE_ID,
|
||||
ot_log_structured_print_id_v (OSTREE_DEPLOYMENT_COMPLETE_ID,
|
||||
"%s; bootconfig swap: %s deployment count change: %i",
|
||||
(bootloader_is_atomic ? "Transaction complete" : "Bootloader updated"),
|
||||
requires_new_bootversion ? "yes" : "no",
|
||||
|
||||
Reference in new issue
Block a user