Commit 80f9f070 authored by Michał Woźniak's avatar Michał Woźniak
Browse files

debug documented

parent 3541677d
......@@ -24,6 +24,11 @@ Imporant caveats:
- `<input_file>` *must* exist (if it doesn't the script will exit with an error)
- `<output_file>`/`<output_directory>` *must not* exist (if it does, the script will exit with an error)
Debug output (a lot of it!) can be enabled by setting the `NGINX_CONF_FLATTEN_DEBUG` environment variable to any non-empty string before running `nginx-conf-flatten`. For example:
```
NGINX_CONF_FLATTEN_DEBUG='yes-please' nginx-conf-flatten flatten /etc/nginx.conf ./flat.conf
```
## Operation
......
......@@ -13,11 +13,11 @@
# being processed resides in
# set debug verbosity to none
[ -z "${NGINX_CONFIG_FLATTEN_DEBUG+x}" ] && NGINX_CONFIG_FLATTEN_DEBUG=""
[ -z "${NGINX_CONF_FLATTEN_DEBUG+x}" ] && NGINX_CONF_FLATTEN_DEBUG=""
function debug {
if [ "$NGINX_CONFIG_FLATTEN_DEBUG" != "" ]; then
if [ "$NGINX_CONF_FLATTEN_DEBUG" != "" ]; then
echo "$@" >&2
fi
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment