From 928ffdf7db708fda21bc454adbb00b7210d42233 Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Mon, 30 Jan 2023 22:11:48 +1100
Subject: [PATCH] provide more information and more color

---
 src/lib66/info/info_graph_display_service.c | 12 ++++++------
 src/lib66/info/info_graph_display_tree.c    |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib66/info/info_graph_display_service.c b/src/lib66/info/info_graph_display_service.c
index 94788903..f363d85e 100644
--- a/src/lib66/info/info_graph_display_service.c
+++ b/src/lib66/info/info_graph_display_service.c
@@ -30,7 +30,7 @@
 
 #include <s6/supervise.h>
 
-int info_graph_display_service(char const *name, char const *obj)
+int info_graph_display_service(char const *name)
 {
     log_flow() ;
 
@@ -89,21 +89,21 @@ int info_graph_display_service(char const *name, char const *obj)
 
     dis:
 
-    if (!bprintf(buffer_1," %s (%s%s%s,%s%s%s,%s%s%s,%s:%s)", \
+    if (!bprintf(buffer_1,"%s (%s%s%s%s,%s%s%s%s,%s%s%s%s,%s%s%s%s)", \
 
         name, \
 
-        pid_color > 1 ? log_color->valid : pid_color ? log_color->error : log_color->warning, \
+        "pid=",pid_color > 1 ? log_color->valid : pid_color ? log_color->error : log_color->warning, \
         ppid, \
         log_color->off, \
 
-        service_is(&sta, STATE_FLAGS_ISENABLED) ? log_color->off : log_color->warning, \
+        "state=", service_is(&sta, STATE_FLAGS_ISENABLED) ? log_color->off : log_color->warning, \
         service_is(&sta, STATE_FLAGS_ISENABLED) ? "Enabled" : "Disabled", \
         log_color->off, \
 
-        log_color->blue, get_key_by_enum(ENUM_TYPE,res.type), log_color->off, \
+        "type=", log_color->blue, get_key_by_enum(ENUM_TYPE,res.type), log_color->off, \
 
-        "tree", res.sa.s + res.treename ))
+        "intree=", BMAGENTA, res.sa.s + res.treename, log_color->off ))
             goto freed ;
 
     err = 1 ;
diff --git a/src/lib66/info/info_graph_display_tree.c b/src/lib66/info/info_graph_display_tree.c
index 5ecbb90d..59b35711 100644
--- a/src/lib66/info/info_graph_display_tree.c
+++ b/src/lib66/info/info_graph_display_tree.c
@@ -75,7 +75,7 @@ int info_graph_display_tree(char const *name)
     if (enabled < 0)
         goto freed ;
 
-    if (!bprintf(buffer_1," %s (%s%s%s,%s%s%s,%s%s%s)", \
+    if (!bprintf(buffer_1,"%s (%s%s%s,%s%s%s,%s%s%s)", \
 
                 name, \
 
-- 
GitLab