mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Add a verbosity concept to kubernetes scripts
The KUBE_VERBOSE environment variable sets the verbosity level to
use. Log messages can specify a verbosity by setting the V
variable. e.g.
V=2 kube::log::info foo bar
Would only print "foo bar" if $KUBE_VERBOSE >= 2.
This commit is contained in:
@@ -23,6 +23,8 @@ if [[ -z "${KUBE_ROOT:-}" ]]; then
|
||||
KUBE_ROOT="../../../"
|
||||
fi
|
||||
|
||||
source "${KUBE_ROOT}/cluster/lib/logging.sh"
|
||||
|
||||
if [[ ! -d "${KUBE_ROOT}/examples" ]]; then
|
||||
echo "${KUBE_ROOT}/examples not detected. This script should be run from a location where the source dirs are available."
|
||||
exit 1
|
||||
@@ -44,4 +46,4 @@ go-bindata -nometadata -prefix "${KUBE_ROOT}" -o ${BINDATA_OUTPUT} -pkg generate
|
||||
|
||||
gofmt -s -w ${BINDATA_OUTPUT}
|
||||
|
||||
echo "Generated bindata file : $(wc -l ${BINDATA_OUTPUT}) lines of lovely automated artifacts"
|
||||
V=2 kube::log::info "Generated bindata file : $(wc -l ${BINDATA_OUTPUT}) lines of lovely automated artifacts"
|
||||
|
||||
Reference in New Issue
Block a user