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/Qntan.h | |
| parent | f6634e99211db37f5af54c1151a4b7792b8dfb9a (diff) | |
| download | Qntan-31f7f1db984eefb67be19e6e7fe68102147337bb.tar.gz Qntan-31f7f1db984eefb67be19e6e7fe68102147337bb.zip | |
Add an abstract Logger.
Diffstat (limited to 'include/qntan/Qntan.h')
| -rw-r--r-- | include/qntan/Qntan.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index 075c7f9..f28d19a 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -55,6 +55,7 @@ struct Qntan_Mallocator; struct Qntan_MemArena; struct Qntan_Executor; struct Qntan_Scheduler; +struct Qntan_Logger; struct Qntan_IoMux; struct Qntan_File; struct Qntan_FileSystem; @@ -258,6 +259,36 @@ struct Qntan_Scheduler { +struct Qntan_Logger { + /* Logger impls MUST prefer format specifiers that are specified in + * stdio printf and related functions. + * Logger impls SHOULD NOT implement format specifiers that could be + * confused by standard specifiers specified by stdio printf and + * related APIs. + */ + void (*fatal)( struct Qntan_Logger**, char const*fmt, ...); + /**/ + void (*error)( struct Qntan_Logger**, char const*fmt, ...); + /**/ + void (*warn)( struct Qntan_Logger**, char const*fmt, ...); + /**/ + void (*info)( struct Qntan_Logger**, char const*fmt, ...); + /**/ + void (*debug)( struct Qntan_Logger**, char const*fmt, ...); + /**/ + void (*trace)( struct Qntan_Logger**, char const*fmt, ...); + /**/ +}; + + + + + + + + + + struct Qntan_IoMux { /* An IO Multiplexer. * |
