Blame SOURCES/0155-meson-add-Dlog-trace-to-set-LOG_TRACE.patch

a3e2b5
From c405c3035b595970e65ac9586909618525372c45 Mon Sep 17 00:00:00 2001
a3e2b5
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
a3e2b5
Date: Tue, 7 Aug 2018 17:34:47 +0200
a3e2b5
Subject: [PATCH] meson: add -Dlog-trace to set LOG_TRACE
a3e2b5
a3e2b5
The justification is the same as for -Dvalgrind: setting config in
a3e2b5
meson in this way is easier, because when the value is changed stuff
a3e2b5
that should be rebuilt is rebuilt.
a3e2b5
a3e2b5
(cherry picked from commit fd5dec9adf76591d713f163d43d04e3beb76893e)
a3e2b5
a3e2b5
Resolves: #1696224
a3e2b5
---
a3e2b5
 meson.build       | 2 ++
a3e2b5
 meson_options.txt | 2 ++
a3e2b5
 2 files changed, 4 insertions(+)
a3e2b5
a3e2b5
diff --git a/meson.build b/meson.build
a3e2b5
index 709597e5c4..c1013d525b 100644
a3e2b5
--- a/meson.build
a3e2b5
+++ b/meson.build
a3e2b5
@@ -782,6 +782,7 @@ conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
a3e2b5
 conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
a3e2b5
 
a3e2b5
 conf.set10('VALGRIND', get_option('valgrind'))
a3e2b5
+conf.set10('LOG_TRACE', get_option('log-trace'))
a3e2b5
 
a3e2b5
 #####################################################################
a3e2b5
 
a3e2b5
@@ -2993,6 +2994,7 @@ foreach tuple : [
a3e2b5
         ['debug hashmap'],
a3e2b5
         ['debug mmap cache'],
a3e2b5
         ['valgrind',         conf.get('VALGRIND') == 1],
a3e2b5
+        ['trace logging',    conf.get('LOG_TRACE') == 1],
a3e2b5
 ]
a3e2b5
 
a3e2b5
         if tuple.length() >= 2
a3e2b5
diff --git a/meson_options.txt b/meson_options.txt
a3e2b5
index 5716f45ccf..f06a130582 100644
a3e2b5
--- a/meson_options.txt
a3e2b5
+++ b/meson_options.txt
a3e2b5
@@ -52,6 +52,8 @@ option('memory-accounting-default', type : 'boolean',
a3e2b5
        description : 'enable MemoryAccounting= by default')
a3e2b5
 option('valgrind', type : 'boolean', value : false,
a3e2b5
        description : 'do extra operations to avoid valgrind warnings')
a3e2b5
+option('log-trace', type : 'boolean', value : false,
a3e2b5
+       description : 'enable low level debug logging')
a3e2b5
 
a3e2b5
 option('utmp', type : 'boolean',
a3e2b5
        description : 'support for utmp/wtmp log handling')