From dc1c87cbf3b8cc1d5389a6547b4f8e9a1a329fa2 Mon Sep 17 00:00:00 2001 From: Pablo2048 Date: Mon, 29 Jul 2024 16:14:03 +0200 Subject: [PATCH] Moznost definice TRACE_ALL=1 pro vsechny ladici informace naraz --- src/trace.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/trace.h b/src/trace.h index 7381a3e..cda46bc 100644 --- a/src/trace.h +++ b/src/trace.h @@ -21,8 +21,10 @@ */ #pragma once +// Vydefinujeme-li promennou TRACE_ALL=1, pak TRACEPLUS se bude vypisovat vsechny zpravy + // Definice jednotlivych typu hlaseni do trasovani -#define TRACE_NONE -1 // nic +#define TRACE_NONE (-1) // nic #define TRACE_ERROR 0 // chybova zprava = cervena #define TRACE_WARNING 1 // varovani - zluta #define TRACE_INFO 2 // informacni zprava - zelena @@ -138,9 +140,13 @@ #define TRACE_FORCEUPDATE(a) ((void) 0) #endif +#ifndef TRACE_ALL + #define TRACE_ALL 0 +#endif + #define TRACEPLUS(when, severity, ...) \ do { \ - constexpr bool handle = (when != 0); \ + constexpr bool handle = (when != 0) || TRACE_ALL; \ if (handle) \ TRACE(severity, __VA_ARGS__); \ } while (0)