diff --git a/Dockerfile b/Dockerfile index 955fe0b..d6d5bae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,6 @@ EXPOSE 514/udp ENV TARGET_HOST="127.0.0.1" ENV TARGET_PROTO="tcp" ENV TARGET_PORT="514" +ENV DEBUG="0" ENTRYPOINT ["/bin/sh", "/run.sh"] \ No newline at end of file diff --git a/README.md b/README.md index 4b3292e..f80c330 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,11 @@ docker build . -t docker.asperti.com/paspo/syslog-forwarder ## environment Variable | Default | Description ---------------|-----------|--------------------------- +--------------|-----------|---------------------------------------------------- TARGET_HOST | 127.0.0.1 | target server IP/hostname TARGET_PROTO | tcp | `tcp` or `udp` TARGET_PORT | 514 | target server syslog port + DEBUG | 0 | if != 0, every received log line is shown on stdout ## run diff --git a/run.sh b/run.sh index 5cec517..9967ea9 100644 --- a/run.sh +++ b/run.sh @@ -9,6 +9,9 @@ TARGET_PROTO=${TARGET_PROTO:-tcp} # 514 is the common default TARGET_PORT=${TARGET_PORT:-514} +# DEBUG MODE ENABLED if != 0 +DEBUG=${DEBUG:-0} + cat >/etc/rsyslog.conf <>/etc/rsyslog.conf <>/etc/rsyslog.conf <