From bb302b54703fb31147b5d26b452b1f0d842befae Mon Sep 17 00:00:00 2001 From: javieryanez Date: Thu, 22 Aug 2019 15:29:29 +0200 Subject: [PATCH] Added LOG_LEVEL environment variable to set logging severity level. --- Dockerfile | 3 ++- README.md | 6 ++++++ haproxy.cfg | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a8dc27..3d0d573 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,8 @@ ENV ALLOW_RESTARTS=0 \ SYSTEM=0 \ TASKS=0 \ VERSION=1 \ - VOLUMES=0 + VOLUMES=0 \ + LOG_LEVEL=info COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg # Metadata diff --git a/README.md b/README.md index 7c270a8..d64afe3 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,12 @@ does not need. - `TASKS` - `VOLUMES` +## Logging + +You can set the logging level or severity level of the messages to be logged with the + environment variable `LOG_LEVEL`. Defaul value is info. Possible values are: debug, + info, notice, warning, err, crit, alert and emerg. + ## Supported API versions - [1.27](https://docs.docker.com/engine/api/v1.27/) diff --git a/haproxy.cfg b/haproxy.cfg index 914b990..1e5aa63 100644 --- a/haproxy.cfg +++ b/haproxy.cfg @@ -1,5 +1,5 @@ global - log stdout format raw daemon + log stdout format raw daemon "${LOG_LEVEL}" pidfile /run/haproxy.pid maxconn 4000