trace2: use system/global config for default trace2 settings
[git/git.git] / trace2.c
index 1c18006..490b3f0 100644 (file)
--- a/trace2.c
+++ b/trace2.c
@@ -10,6 +10,7 @@
 #include "trace2/tr2_cmd_name.h"
 #include "trace2/tr2_dst.h"
 #include "trace2/tr2_sid.h"
+#include "trace2/tr2_sysenv.h"
 #include "trace2/tr2_tgt.h"
 #include "trace2/tr2_tls.h"
 
@@ -120,6 +121,7 @@ static void tr2main_atexit_handler(void)
        tr2_sid_release();
        tr2_cmd_name_release();
        tr2_cfg_free_patterns();
+       tr2_sysenv_release();
 
        trace2_enabled = 0;
 }
@@ -155,6 +157,8 @@ void trace2_initialize_fl(const char *file, int line)
        if (trace2_enabled)
                return;
 
+       tr2_sysenv_load();
+
        if (!tr2_tgt_want_builtins())
                return;
        trace2_enabled = 1;