MEDIUM: log: New format-log flags: %Fi %Fp %Si %Sp %Ts %rt %H %pid

%Fi: Frontend IP
%Fp: Frontend Port
%Si: Server IP
%Sp: Server Port
%Ts: Timestamp
%rt: HTTP request counter
%H: hostname
%pid: PID

+X: Hexadecimal represenation

The +X mode in logformat displays hexadecimal for the following flags
%Ci %Cp %Fi %Fp %Bi %Bp %Si %Sp %Ts %ct %pid

rename logformat_write_string() to lf_text()

Optimize size computation
diff --git a/include/proto/log.h b/include/proto/log.h
index 2efb539..0e41eca 100644
--- a/include/proto/log.h
+++ b/include/proto/log.h
@@ -117,11 +117,24 @@
 
 /*
  * Write a string in the log string
- * Take cares of mandatory and quote options
+ * Take cares of quote options
  *
  * Return the adress of the \0 character, or NULL on error
  */
-char *logformat_write_string(char *dst, char *src, size_t size, struct logformat_node *node);
+char *lf_text(char *dst, char *src, size_t size, struct logformat_node *node);
+
+/*
+ * Write a IP adress to the log string
+ * +X option write in hexadecimal notation, most signifant byte on the left
+ */
+char *lf_ip(char *dst, struct sockaddr *sockaddr, size_t size, struct logformat_node *node);
+
+/*
+ * Write a port to the log
+ * +X option write in hexadecimal notation, most signifant byte on the left
+ */
+char *lf_port(char *dst, struct sockaddr *sockaddr, size_t size, struct logformat_node *node);
+
 
 #endif /* _PROTO_LOG_H */