[tracker/sam/debug: 5/5] Use structured logging



commit 3759909d37837aff4b54d26d9e49e6b98930a9d5
Author: Sam Thursfield <sam afuera me uk>
Date:   Mon Apr 20 01:24:55 2020 +0200

    Use structured logging
    
    There now isn't a way to control the log verbosity of the Tracker
    daemons, so all g_debug() output will go to the syslog or journal.
    We need to ensure the debug output is useful, but by switching to
    structured logging we also ensure that users will be able to filter out
    the debug messages easily.
    
    See https://blog.gtk.org/2017/05/04/logging-and-more/ for more details
    about structured logging.

 meson.build | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/meson.build b/meson.build
index 99a1077ef..1e72fe963 100644
--- a/meson.build
+++ b/meson.build
@@ -67,9 +67,11 @@ add_project_arguments('-Wno-pointer-sign', language: 'c')
 
 add_project_arguments('-DTRACKER_COMPILATION',
                       '-DG_LOG_DOMAIN="Tracker"',
+                      '-DG_LOG_STRUCTURED=1',
                       language: 'c')
 add_project_arguments(['-D', 'TRACKER_COMPILATION'],
                       ['-D', 'G_LOG_DOMAIN="Tracker"'],
+                      ['-D', 'G_LOG_STRUCTURED=1'],
                       language: 'vala')
 
 debug_cflags = []


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]