diff options
| author | Andreas Fankhauser hiddenalpha.ch | 2026-01-02 17:20:48 +0100 |
|---|---|---|
| committer | Andreas Fankhauser hiddenalpha.ch | 2026-01-02 17:20:48 +0100 |
| commit | 31f7f1db984eefb67be19e6e7fe68102147337bb (patch) | |
| tree | b0ed01958984b3c8a9a2b22a22508ec9db7a9810 /include/qntan/Log.h | |
| parent | f6634e99211db37f5af54c1151a4b7792b8dfb9a (diff) | |
| download | Qntan-31f7f1db984eefb67be19e6e7fe68102147337bb.tar.gz Qntan-31f7f1db984eefb67be19e6e7fe68102147337bb.zip | |
Add an abstract Logger.
Diffstat (limited to 'include/qntan/Log.h')
| -rw-r--r-- | include/qntan/Log.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/qntan/Log.h b/include/qntan/Log.h new file mode 100644 index 0000000..87adba3 --- /dev/null +++ b/include/qntan/Log.h @@ -0,0 +1,40 @@ +#ifndef INCGUARD_A5xxH0Ai6CpNInqK +#define INCGUARD_A5xxH0Ai6CpNInqK + +#ifdef __cplusplus +extern "C" { +#endif + + + +#ifndef LOGF +# define LOGF(A, ...) if(A) (*(A))->fatal(A, __VA_ARGS__) +#endif + +#ifndef LOGE +# define LOGE(A, ...) if(A) (*(A))->error(A, __VA_ARGS__) +#endif + +#ifndef LOGW +# define LOGW(A, ...) if(A) (*(A))->warn(A, __VA_ARGS__) +#endif + +#ifndef LOGI +# define LOGI(A, ...) if(A) (*(A))->info(A, __VA_ARGS__) +#endif + +#ifndef LOGD +# define LOGD(A, ...) if(A) (*(A))->debug(A, __VA_ARGS__) +#endif + +#ifndef LOGT +# define LOGT(A, ...) if(A) (*(A))->trace(A, __VA_ARGS__) +#endif + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* INCGUARD_A5xxH0Ai6CpNInqK */ |
