--- a/src/log.h Fri May 08 01:42:44 2009 +0300
+++ b/src/log.h Fri May 08 01:43:02 2009 +0300
@@ -6,6 +6,7 @@
* Local logging functions
*/
#include "error.h"
+#include <stdarg.h>
/**
* Log level definitions
@@ -53,6 +54,15 @@
void log_set_func (log_output_func func, void *arg);
/**
+ * Internal logging func, meant for using custom level tags. This performs the filtering of log levels.
+ *
+ * Format the full output line, and pass it to the log_output_func. The line will be of the form:
+ * "[<tag>] <func> : <user_fmt> [ <log_fmt> ]"
+ */
+void log_output_tag (enum log_level level, const char *tag, const char *func, const char *user_fmt, va_list user_fmtargs, const char *log_fmt, ...)
+ __attribute__ ((format (printf, 6, 7)));
+
+/**
* Log a message with the given level
*/
void log_msg (enum log_level level, const char *func, const char *format, ...)