From 31f7f1db984eefb67be19e6e7fe68102147337bb Mon Sep 17 00:00:00 2001 From: Andreas Fankhauser hiddenalpha.ch Date: Fri, 2 Jan 2026 17:20:48 +0100 Subject: Add an abstract Logger. --- include/qntan/Qntan.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'include/qntan/Qntan.h') 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. * -- cgit v1.3.1