mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-06 07:34:39 +02:00
MINOR: log/applet: add new function syslog_applet_append_event()
This function takes a buffer on input, and offset and a length, and consumes the block from that buffer to send it to the appctx's output buffer. Contrary to its sibling applet_append_line(), instead of just appending an LF at the end of the line, it prepends the message size in decimal and a space before the message, as expected by syslog TCP implementaions. This will be used to simplify the ring reader code.
This commit is contained in:
@@ -87,6 +87,8 @@ void app_log(struct list *loggers, struct buffer *tag, int level, const char *fo
|
||||
*/
|
||||
int add_to_logformat_list(char *start, char *end, int type, struct list *list_format, char **err);
|
||||
|
||||
ssize_t syslog_applet_append_event(void *ctx, const struct buffer *buf, size_t ofs, size_t len);
|
||||
|
||||
/*
|
||||
* Parse the log_format string and fill a linked list.
|
||||
* Variable name are preceded by % and composed by characters [a-zA-Z0-9]* : %varname
|
||||
|
||||
Reference in New Issue
Block a user