MEDIUM: logs: add a new RFC5424 log-format for the structured-data

This patch adds a new RFC5424-specific log-format for the structured-data
that is automatically send by __send_log() when the sender is in RFC5424
mode.

A new statement "log-format-sd" should be used in order to set log-format
for the structured-data part in RFC5424 formatted syslog messages.
Example:

    log-format-sd [exampleSDID@1234\ bytes=\"%B\"\ status=\"%ST\"]
diff --git a/include/types/arg.h b/include/types/arg.h
index fd35354..5430de7 100644
--- a/include/types/arg.h
+++ b/include/types/arg.h
@@ -69,6 +69,7 @@
 	ARGC_STK,      /* sticking rule */
 	ARGC_TRK,      /* tracking rule */
 	ARGC_LOG,      /* log-format */
+	ARGC_LOGSD,    /* log-format-sd */
 	ARGC_HRQ,      /* http-request */
 	ARGC_HRS,      /* http-response */
 	ARGC_UIF,      /* unique-id-format */
diff --git a/include/types/log.h b/include/types/log.h
index 2cfd31a..6a68b5d 100644
--- a/include/types/log.h
+++ b/include/types/log.h
@@ -30,7 +30,7 @@
 
 #define NB_LOG_FACILITIES       24
 #define NB_LOG_LEVELS           8
-#define NB_MSG_IOVEC_ELEMENTS   3
+#define NB_MSG_IOVEC_ELEMENTS   4
 #define SYSLOG_PORT             514
 #define UNIQUEID_LEN            128
 
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 9793a29..49debc6 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -345,6 +345,7 @@
 	unsigned int log_count;			/* number of logs produced by the frontend */
 	struct list logsrvs;
 	struct list logformat; 			/* log_format linked list */
+	struct list logformat_sd;		/* log_format linked list for the RFC5424 structured-data part */
 	char *log_tag;                          /* override default syslog tag */
 	struct chunk log_htp;			/* a syslog header part that contains hostname, log_tag and pid (RFC3164 format) */
 	struct chunk log_htp_rfc5424;		/* a syslog header part that contains hostname, log_tag and pid (RFC5424 format) */
@@ -404,6 +405,9 @@
 		int   uif_line;                 /* file name where the unique-id-format string appears */
 		char *uif_file;                 /* file name where the unique-id-format string appears (strdup) */
 		char *uniqueid_format_string;	/* unique-id format string */
+		char *logformat_sd_string;	/* log format string for the RFC5424 structured-data part */
+		char *lfsd_file;		/* file name where the structured-data logformat string for RFC5424 appears (strdup) */
+		int  lfsd_line;			/* file name where the structured-data logformat string for RFC5424 appears */
 	} conf;					/* config information */
 	void *parent;				/* parent of the proxy when applicable */
 	struct comp *comp;			/* http compression */