summaryrefslogtreecommitdiffstats
path: root/src/dmilog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dmilog.h')
-rw-r--r--src/dmilog.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dmilog.h b/src/dmilog.h
index 98d0780..76c87b6 100644
--- a/src/dmilog.h
+++ b/src/dmilog.h
@@ -46,8 +46,16 @@ struct _Log_t {
};
typedef struct _Log_t Log_t;
+/**
+ * Log flags. These flags can be OR'ed together
+ */
+typedef enum { LOGFL_NORMAL = 1, /**< Normal behaviour, log everything and use stderr on errors */
+ LOGFL_NODUPS = 2, /**< Don't log messages we already have logged */
+ LOGFL_NOSTDERR = 4 /**< Don't use stderr even if log functions fails */
+} Log_f;
+
Log_t * log_init();
-int log_append(Log_t *logp, int level, const char *fmt, ...);
+int log_append(Log_t *logp, Log_f flags, int level, const char *fmt, ...);
char * log_retrieve(Log_t *logp, int level);
size_t log_clear_partial(Log_t *logp, int level, int unread);
void log_close(Log_t *logp);