summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/qntan/Qntan.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h
index ea35e70..e159546 100644
--- a/include/qntan/Qntan.h
+++ b/include/qntan/Qntan.h
@@ -66,6 +66,7 @@ struct Qntan_MemArena;
struct Qntan_Executor;
struct Qntan_Scheduler;
struct Qntan_Logger;
+struct Qntan_LoggerFactory;
struct Qntan_IoMux;
struct Qntan_File;
struct Qntan_FileSystem_Dirent;
@@ -365,6 +366,34 @@ struct Qntan_Logger {
+#ifndef Qntan_LoggerFactory_getLogger
+# define Qntan_LoggerFactory_getLogger(A, B) (*A)->getLogger(A, B)
+#endif
+
+struct Qntan_LoggerFactory {
+ /* TODO: Clarify resource responsibilities: For how long is the
+ * returned logger valid? What happens if called twice? How to
+ * `unref()` a logger we got? ...
+ */
+ struct Qntan_Logger**(*getLogger)( struct Qntan_LoggerFactory**, char const*name );
+ /* A ZERO-TERMINATED identifier identifying the requested logger.
+ * Usually this should be an unique, short, printable name. Eg
+ * "LibFoo/ItemProcessor", "LibBar/CustomerService" or whatever.
+ * This is solely an indicator for the implementation so it can
+ * categorize/group/manage loggers. An impl may also decide to just
+ * completely ignore the given hint.
+ */
+};
+
+
+
+
+
+
+
+
+
+
#ifndef Qntan_IoMux_read
# define Qntan_IoMux_read(A, B, C, D, E, F, G) (*A)->read(A, B, C, D, E, F, G)
#endif