MINOR: log: Provide a function to emit a log for an application
Application is a generic term here. It is a modules which handle its own log
server list, with no dependency on a proxy. Such applications can now call the
function app_log() to log messages, passing a log server list and a tag as
parameters. Internally, the function __send_log() has been adapted accordingly.
diff --git a/include/proto/log.h b/include/proto/log.h
index 7b056c5..6c96432 100644
--- a/include/proto/log.h
+++ b/include/proto/log.h
@@ -87,6 +87,10 @@
void strm_log(struct stream *s);
void sess_log(struct session *sess);
+/* send a applicative log with custom list of log servers */
+void app_log(struct list *logsrvs, struct buffer *tag, int level, const char *format, ...)
+ __attribute__ ((format(printf, 4, 5)));
+
/*
* add to the logformat linked list
*/
@@ -141,7 +145,7 @@
* It doesn't care about errors nor does it report them.
*/
-void __send_log(struct proxy *p, int level, char *message, size_t size, char *sd, size_t sd_size);
+void __send_log(struct list *logsrvs, struct buffer *tag, int level, char *message, size_t size, char *sd, size_t sd_size);
/*
* returns log format for <fmt> or -1 if not found.