feat: add the ability to set the haproxy log level

This commit is contained in:
Jose Diaz-Gonzalez
2022-11-06 00:26:48 -04:00
parent 8bd4f66bec
commit fd09beaf48
5 changed files with 23 additions and 4 deletions

View File

@@ -35,7 +35,8 @@ fn-haproxy-template-compose-file() {
COMPOSE_TEMPLATE="$CUSTOM_COMPOSE_TEMPLATE"
fi
local SIGIL_PARAMS=(HAPROXY_IMAGE="$(fn-haproxy-image)")
local SIGIL_PARAMS=(HAPROXY_IMAGE="$(fn-haproxy-image)"
HAPROXY_LOG_LEVEL="$(fn-traefik-log-level)")
sigil -f "$COMPOSE_TEMPLATE" "${SIGIL_PARAMS[@]}" | cat -s >"$OUTPUT_PATH"
}
@@ -43,3 +44,9 @@ fn-haproxy-template-compose-file() {
fn-haproxy-image() {
fn-plugin-property-get-default "haproxy" "--global" "image" "byjg/easy-haproxy:4.2.0"
}
fn-haproxy-log-level() {
local log_level
log_level="$(fn-plugin-property-get-default "haproxy" "--global" "log-level" "ERROR")"
echo "${log_level^^}"
}