Filter logs send by syslog log driver


I have configured syslog logging driver,Everything which comes in stdout and stderr get directed outside the host to my syslog port.I want to filter this message and send specific message only.Is there any way to configure this setting?

Steps to recreate:

  1. Execute the following command : echo “{ “insecure-registries”:[“xxx:xx”], “log-driver”: “syslog”, “log-opts”: { “syslog-address”:“udp://”,“mode”:“non-blocking”, “syslog-format”:“rfc3164”, “tag”:“stream.cosmos”} }” > /etc/docker/daemon.json;
  2. sudo service docker restart

3.docker run -it --log-opt mode=non-blocking --shm-size 34G imagexxxx /bin/bash

4.On you host machine listen on

sudo ngrep -d lo port 11514