MEDIUM: ring: new section ring to declare custom ring buffers.

It is possible to globally declare ring-buffers, to be used as target for log
servers or traces.

ring <ringname>
  Creates a new ring-buffer with name <ringname>.

description <text>
  The descritpition is an optional description string of the ring. It will
  appear on CLI. By default, <name> is reused to fill this field.

format <format>
  Format used to store events into the ring buffer.

  Arguments:
    <format> is the log format used when generating syslog messages. It may be
             one of the following :

      iso     A message containing only the ISO date, followed by the text.
              The PID, process name and system name are omitted. This is
              designed to be used with a local log server.

      raw     A message containing only the text. The level, PID, date, time,
              process name and system name are omitted. This is designed to be
              used in containers or during development, where the severity
              only depends on the file descriptor used (stdout/stderr). This
              is the default.

      rfc3164 The RFC3164 syslog message format. This is the default.
              (https://tools.ietf.org/html/rfc3164)

      rfc5424 The RFC5424 syslog message format.
              (https://tools.ietf.org/html/rfc5424)

      short   A message containing only a level between angle brackets such as
              '<3>', followed by the text. The PID, date, time, process name
              and system name are omitted. This is designed to be used with a
              local log server. This format is compatible with what the systemd
              logger consumes.

      timed   A message containing only a level between angle brackets such as
              '<3>', followed by ISO date and by the text. The PID, process
              name and system name are omitted. This is designed to be
              used with a local log server.

maxlen <length>
  The maximum length of an event message stored into the ring,
  including formatted header. If an event message is longer than
  <length>, it will be truncated to this length.

size <size>
  This is the optional size in bytes for the ring-buffer. Default value is
  set to BUFSIZE.

  Example:
    global
        log ring@myring local7

    ring myring
        description "My local buffer"
        format rfc3164
        maxlen 1200

Note: ring names are resolved during post configuration processing.
diff --git a/src/log.c b/src/log.c
index 78f1a9e..d69c94e 100644
--- a/src/log.c
+++ b/src/log.c
@@ -1041,16 +1041,10 @@
 	/* now, back to the address */
 	logsrv->type = LOG_TARGET_DGRAM;
 	if (strncmp(args[1], "ring@", 5) == 0) {
-		struct sink *sink = sink_find(args[1] + 5);
-
-		if (!sink || sink->type != SINK_TYPE_BUFFER) {
-			memprintf(err, "cannot find ring buffer '%s'", args[1] + 5);
-			goto error;
-		}
-
 		logsrv->addr.ss_family = AF_UNSPEC;
 		logsrv->type = LOG_TARGET_BUFFER;
-		logsrv->sink = sink;
+		logsrv->sink = NULL;
+		logsrv->ring_name = strdup(args[1] + 5);
 		goto done;
 	}