]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Clean up some examples and log messages
authorMike Brady <mikebrady@eircom.net>
Sat, 10 Mar 2018 19:14:52 +0000 (19:14 +0000)
committerMike Brady <mikebrady@eircom.net>
Sat, 10 Mar 2018 19:14:52 +0000 (19:14 +0000)
dbus-diagnostics.c
documents/sample dbus commands

index 89f2f8f30332d16a1e96a4baab713d4c95963712..a45a86d7701d109ceaf138c85d6d4d06b6a2b9bd 100644 (file)
@@ -21,11 +21,11 @@ gboolean notify_elapsed_time_callback(ShairportSyncDiagnostics *skeleton,
                                                 __attribute__((unused)) gpointer user_data) {
   // debug(1, "\"notify_elapsed_time_callback\" called.");
   if (shairport_sync_diagnostics_get_elapsed_time(skeleton)) {
-    debug(1, ">> start including elapsed time in logs");
     config.debugger_show_elapsed_time = 1;
+    debug(1, ">> start including elapsed time in logs");
   } else {
-    debug(1, ">> stop including elapsed time in logs");
     config.debugger_show_elapsed_time = 0;
+    debug(1, ">> stop including elapsed time in logs");
   }
   return TRUE;
 }
@@ -34,11 +34,11 @@ gboolean notify_delta_time_callback(ShairportSyncDiagnostics *skeleton,
                                                 __attribute__((unused)) gpointer user_data) {
   // debug(1, "\"notify_delta_time_callback\" called.");
   if (shairport_sync_diagnostics_get_delta_time(skeleton)) {
-    debug(1, ">> start including delta time in logs");
     config.debugger_show_relative_time = 1;
+    debug(1, ">> start including delta time in logs");
   } else {
-    debug(1, ">> stop including delta time in logs");
     config.debugger_show_relative_time = 0;
+    debug(1, ">> stop including delta time in logs");
   }
   return TRUE;
 }
@@ -60,8 +60,8 @@ gboolean notify_verbosity_callback(ShairportSyncDiagnostics *skeleton,
                                             __attribute__((unused)) gpointer user_data) {
   gint th = shairport_sync_diagnostics_get_verbosity(skeleton);
   if ((th >= 0) && (th <= 3)) {
-    debug(1, ">> set log verbosity to %d.", th);
     debuglev = th;
+    debug(1, ">> log verbosity set to %d.", th);
   } else {
     debug(1, ">> invalid log verbosity: %d. Ignored.", th);
   }
index 7e7a3c9d618cbbdc07c9c186b061e337e55b6ee8..8541582d84bf740d5b517d37080dc13db12c0cee 100644 (file)
@@ -4,7 +4,15 @@ dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/Shair
 echo `dbus-send --print-reply=literal --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync/Diagnostics org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:Verbosity`
 # Set Log Verbosity to 2
 dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync/Diagnostics org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync.Diagnostics string:Verbosity variant:int32:2
+
 # Get Statistics-Requested Status
 dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync/Diagnostics org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:Statistics
 # Set Statistics-Requested Status to true
 dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync/Diagnostics org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync.Diagnostics string:Statistics variant:boolean:true
+
+# Is Elapsed Time included in Log Entries?
+dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync/Diagnostics org.freedesktop.DBus.Properties.Get string:org.gnome.ShairportSync.Diagnostics string:ElapsedTime
+# Include Elapsed Time in Log Entries
+dbus-send --print-reply --system --dest=org.gnome.ShairportSync /org/gnome/ShairportSync/Diagnostics org.freedesktop.DBus.Properties.Set string:org.gnome.ShairportSync.Diagnostics string:ElapsedTime variant:boolean:true
+
+