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

debug documented

parent 3541677d
...@@ -24,6 +24,11 @@ Imporant caveats: ...@@ -24,6 +24,11 @@ Imporant caveats:
- `<input_file>` *must* exist (if it doesn't the script will exit with an error) - `<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) - `<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 ## Operation
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
# being processed resides in # being processed resides in
# set debug verbosity to none # 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 { function debug {
if [ "$NGINX_CONFIG_FLATTEN_DEBUG" != "" ]; then if [ "$NGINX_CONF_FLATTEN_DEBUG" != "" ]; then
echo "$@" >&2 echo "$@" >&2
fi 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