MEDIUM: logs: buffer targets now rely on new sink_write

Before this path, they rely directly on ring_write bypassing
a part of the sink API.

Now the maxlen parameter of the log will apply only on the text
message part (and not the header, for this you woud prefer
to use the maxlen parameter on the sink/ring).

sink_write prototype was also reviewed to return the number of Bytes
written to be compliant with the other write functions.
diff --git a/include/proto/sink.h b/include/proto/sink.h
index bab9681..d30f30a 100644
--- a/include/proto/sink.h
+++ b/include/proto/sink.h
@@ -39,8 +39,10 @@
  * array <msg> to sink <sink>. Formatting according to the sink's preference is
  * done here. Lost messages are accounted for in the sink's counter. If there
  * were lost messages, an attempt is first made to indicate it.
+ * The function returns the number of Bytes effectively sent or announced.
+ * or <= 0 in other cases.
  */
-static inline void sink_write(struct sink *sink, const struct ist msg[], size_t nmsg,
+static inline ssize_t sink_write(struct sink *sink, const struct ist msg[], size_t nmsg,
                               int level, int facility, struct ist * tag,
                               struct ist *pid, struct ist *sd)
 {
@@ -72,6 +74,8 @@
  fail:
 	if (unlikely(sent <= 0))
 		HA_ATOMIC_ADD(&sink->ctx.dropped, 1);
+
+	return sent;
 }
 
 #endif /* _PROTO_SINK_H */
diff --git a/include/types/log.h b/include/types/log.h
index 868c08f..88c3a8c 100644
--- a/include/types/log.h
+++ b/include/types/log.h
@@ -211,7 +211,7 @@
 	struct list list;
 	struct sockaddr_storage addr;
 	struct smp_info lb;
-	struct ring *ring;
+	struct sink *sink;
 	enum log_tgt type;
 	int format;
 	int facility;