|
FZGPUModules 2.0
GPU-accelerated modular compression pipelines
|
#include <log.h>
Static Public Member Functions | |
| static void | setCallback (Callback cb) |
| static void | setMinLevel (LogLevel level) |
| static void | enableStderr (LogLevel min_level=LogLevel::INFO) |
| static void | log (LogLevel level, const char *fmt,...) |
| static void | print (const char *fmt,...) |
Singleton logging interface for FZGPUModules.
Routes all log messages through a single user-supplied callback, enabling redirection to stderr, a file, or a test buffer without recompilation. Log calls below the compile-time FZ_LOG_MIN_LEVEL threshold expand to ((void)0) and have zero runtime cost.
|
inlinestatic |
Set the output callback. All log messages at or above the runtime minimum level are forwarded to this function. Pass nullptr to silence all runtime output (compile-time disabled calls are already gone).
|
inlinestatic |
Set the runtime minimum log level. Messages below this level are dropped even if the compile-time floor allows them. Useful for toggling verbosity at runtime without recompiling.
Note: the effective floor is max(FZ_LOG_MIN_LEVEL, runtime minLevel). Setting a runtime level lower than the compile-time floor has no effect because those call sites are already compiled out.
|
inlinestatic |
Convenience: enable logging at or above min_level to stderr. Format: "[fzgmod:LEVEL] message"
|
inlinestatic |
Emit a log message. Called by the FZ_LOG macro only for levels that passed compile-time gating; do not call directly.
|
inlinestatic |
Diagnostic output — always emits, not filtered by log level. Used by printDAG(), printBufferLifetimes(), and similar explicit diagnostic helpers that the caller has explicitly invoked.
Routes through the callback (as INFO) if one is set; otherwise writes to stdout so explicit diagnostic calls are never silently swallowed.