summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-05-24 13:19:29 -0400
committerColin Walters <walters@verbum.org>2014-05-24 13:19:29 -0400
commit78726244a06e28b6c8a909c2f86b0db4e994e146 (patch)
treedd8538b069ad9eae0bff015130270d0885b04130
parentbf37a9c74189320f7bc9589584675e60c8d7c19f (diff)
downloadostree-78726244a06e28b6c8a909c2f86b0db4e994e146.tar.gz
deploy: Convert remaining g_print() to systemd journal messages
These bits should be logged more sanely.
-rw-r--r--src/libostree/ostree-sysroot-deploy.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index abd12291..f74fd922 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -28,6 +28,8 @@
#include "otutil.h"
#include "libgsystem.h"
+#define OSTREE_VARRELABEL_ID "da679b08acd34504b789d96f818ea781"
+#define OSTREE_CONFIGMERGE_ID "d3863baec13e4449ab0384684a8af3a7"
#define OSTREE_DEPLOYMENT_COMPLETE_ID "dd440e3e549083b63d0efc7dc15255f1"
/* FIXME when we depend on new enough libgsystem, move to
@@ -429,13 +431,11 @@ merge_etc_changes (GFile *orig_etc,
goto out;
}
- if (modified->len > 0 || removed->len > 0 || added->len > 0)
- g_print ("ostadmin: Processing /etc: %u modified, %u removed, %u added\n",
- modified->len,
- removed->len,
- added->len);
- else
- g_print ("ostadmin: No modified configuration\n");
+ gs_log_structured_print_id_v (OSTREE_CONFIGMERGE_ID,
+ "Copying /etc changes: %u modified, %u removed, %u added",
+ modified->len,
+ removed->len,
+ added->len);
for (i = 0; i < removed->len; i++)
{
@@ -713,8 +713,9 @@ selinux_relabel_var_if_needed (OstreeSysroot *sysroot,
if (!g_file_query_exists (deployment_var_labeled, NULL))
{
- g_print ("ostadmin: Didn't find '%s', relabeling /var\n",
- gs_file_get_path_cached (deployment_var_labeled));
+ gs_log_structured_print_id_v (OSTREE_VARRELABEL_ID,
+ "Relabeling /var (no stamp file '%s' found)",
+ gs_file_get_path_cached (deployment_var_labeled));
if (!selinux_relabel_dir (sysroot, sepolicy,
deployment_var_path, "var",
@@ -834,10 +835,6 @@ merge_configuration (OstreeSysroot *sysroot,
cancellable, error))
goto out;
}
- else
- {
- g_print ("ostadmin: No previous configuration changes to merge\n");
- }
ret = TRUE;
gs_transfer_out_value (out_sepolicy, &sepolicy);