meson: add -Dlog-trace to set LOG_TRACE
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 Aug 2018 15:34:47 +0000 (17:34 +0200)
committerLukáš Nykrýn <lnykryn@redhat.com>
Fri, 3 May 2019 10:50:30 +0000 (12:50 +0200)
The justification is the same as for -Dvalgrind: setting config in
meson in this way is easier, because when the value is changed stuff
that should be rebuilt is rebuilt.

(cherry picked from commit fd5dec9adf76591d713f163d43d04e3beb76893e)

Resolves: #1696224

meson.build
meson_options.txt

index 709597e5c41a57b59955b01213ebaaf1f17e895b..c1013d525b5adc2760935c968782e7ff4af0a3b3 100644 (file)
@@ -782,6 +782,7 @@ conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
 conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
 
 conf.set10('VALGRIND', get_option('valgrind'))
+conf.set10('LOG_TRACE', get_option('log-trace'))
 
 #####################################################################
 
@@ -2993,6 +2994,7 @@ foreach tuple : [
         ['debug hashmap'],
         ['debug mmap cache'],
         ['valgrind',         conf.get('VALGRIND') == 1],
+        ['trace logging',    conf.get('LOG_TRACE') == 1],
 ]
 
         if tuple.length() >= 2
index 5716f45ccf1134e6dd6877e2fff84d04663c123a..f06a1305820a8080661e3e1d27ad777879035d6a 100644 (file)
@@ -52,6 +52,8 @@ option('memory-accounting-default', type : 'boolean',
        description : 'enable MemoryAccounting= by default')
 option('valgrind', type : 'boolean', value : false,
        description : 'do extra operations to avoid valgrind warnings')
+option('log-trace', type : 'boolean', value : false,
+       description : 'enable low level debug logging')
 
 option('utmp', type : 'boolean',
        description : 'support for utmp/wtmp log handling')