MEDIUM: log: support a user-configurable max log line length

With all the goodies supported by logformat, people find that the limit
of 1024 chars for log lines is too short. Some servers do not support
larger lines and can simply drop them, so changing the default value is
not always the best choice.

This patch takes a different approach. Log line length is specified per
log server on the "log" line, with a value between 80 and 65535. That
way it's possibly to satisfy all needs, even with some fat local servers
and small remote ones.
(cherry picked from commit 18324f574f349d510622ff45635de899437a3a11)
diff --git a/include/proto/log.h b/include/proto/log.h
index e3c1a75..54c51d1 100644
--- a/include/proto/log.h
+++ b/include/proto/log.h
@@ -39,6 +39,7 @@
 extern char default_tcp_log_format[];
 extern char default_http_log_format[];
 extern char clf_http_log_format[];
+extern char *logline;
 
 
 int build_logline(struct session *s, char *dst, size_t maxsize, struct list *list_format);
diff --git a/include/types/global.h b/include/types/global.h
index 23e3f3d..77df1dd 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -110,6 +110,7 @@
 	int last_checks;
 	int spread_checks;
 	int max_spread_checks;
+	int max_syslog_len;
 	char *chroot;
 	char *pidfile;
 	char *node, *desc;		/* node name & description */
diff --git a/include/types/log.h b/include/types/log.h
index b3288bd..c7e47ea 100644
--- a/include/types/log.h
+++ b/include/types/log.h
@@ -152,6 +152,7 @@
 	int facility;
 	int level;
 	int minlvl;
+	int maxlen;
 };
 
 #endif /* _TYPES_LOG_H */