Export access log as json via udp or tcp, e.g. using GELF?

Hi

is there a way to stream the access log to graylog using GELF? It would only require to simply stream the access log json to an udp or tcp port. Has anybody done this already?

Michael

I do this at the docker level.

docker-daemon.json 
{
  "log-driver": "gelf",
  "log-opts": {
    "gelf-address": "udp://127.0.0.1:12201",
    "gelf-compression-type": "none",
    "labels": "com.custom.service"
      }
}

Same pragmas can be used for a singleton container with appropriate command line arguments.

I'm looking for that too. I would like to send the access logs to a greylog server, but I couldn't find a suitable configuration in the documentation. Also no plugin.
Intercepting it in Docker is not sufficient because not all information from the clients arrives there and the web server I use cannot create any corresponding logs.

The Traefik access logs doc clearly states:

By default access logs are written to the standard output. To write the logs into a log file, use the filePath option.

So you can either send the logs to Docker and let Docker send it somewhere or you need another process that reads and follows a log file and pushes the data somewhere.