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)