[ostree] deploy: Convert remaining g_print() to systemd journal messages
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] deploy: Convert remaining g_print() to systemd journal messages
- Date: Sat, 24 May 2014 17:20:21 +0000 (UTC)
commit 78726244a06e28b6c8a909c2f86b0db4e994e146
Author: Colin Walters <walters verbum org>
Date: Sat May 24 13:19:29 2014 -0400
deploy: Convert remaining g_print() to systemd journal messages
These bits should be logged more sanely.
src/libostree/ostree-sysroot-deploy.c | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index abd1229..f74fd92 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]