mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Increase logging levels in hack/local-up-cluster.sh
This commit is contained in:
parent
e294cef9d4
commit
868c6fe4b8
@ -5,21 +5,22 @@ The following conventions for the glog levels to use. glog is globally prefered
|
|||||||
|
|
||||||
* glog.Errorf() - Always an error
|
* glog.Errorf() - Always an error
|
||||||
* glog.Warningf() - Something unexpected, but probably not an error
|
* glog.Warningf() - Something unexpected, but probably not an error
|
||||||
* glog.Infof / glog.V(0) - Generally useful for this to ALWAYS be visible to an operator
|
* glog.Infof() has multiple levels:
|
||||||
* Programmer errors
|
* glog.V(0) - Generally useful for this to ALWAYS be visible to an operator
|
||||||
* Logging extra info about a panic
|
* Programmer errors
|
||||||
* CLI argument handling
|
* Logging extra info about a panic
|
||||||
* glog.V(1) - A reasonable default log level if you don't want verbosity.
|
* CLI argument handling
|
||||||
* Information about config (listening on X, watching Y)
|
* glog.V(1) - A reasonable default log level if you don't want verbosity.
|
||||||
* Errors that repeat frequently that relate to conditions that can be corrected (pod detected as unhealthy)
|
* Information about config (listening on X, watching Y)
|
||||||
* glog.V(2) - Useful steady state information about the service and important log messages that may correlate to significant changes in the system. This is the recommended default log level for most systems.
|
* Errors that repeat frequently that relate to conditions that can be corrected (pod detected as unhealthy)
|
||||||
* Logging HTTP requests and their exit code
|
* glog.V(2) - Useful steady state information about the service and important log messages that may correlate to significant changes in the system. This is the recommended default log level for most systems.
|
||||||
* System state changing (killing pod)
|
* Logging HTTP requests and their exit code
|
||||||
* Controller state change events (starting pods)
|
* System state changing (killing pod)
|
||||||
* Scheduler log messages
|
* Controller state change events (starting pods)
|
||||||
* glog.V(3) - Extended information about changes
|
* Scheduler log messages
|
||||||
* More info about system state changes
|
* glog.V(3) - Extended information about changes
|
||||||
* glog.V(4) - Debug level verbosity (for now)
|
* More info about system state changes
|
||||||
* Logging in particularly thorny parts of code where you may want to come back later and check it
|
* glog.V(4) - Debug level verbosity (for now)
|
||||||
|
* Logging in particularly thorny parts of code where you may want to come back later and check it
|
||||||
|
|
||||||
As per the comments, the practical default level is V(2). Developers and QE environments may wish to run at V(3) or V(4).
|
As per the comments, the practical default level is V(2). Developers and QE environments may wish to run at V(3) or V(4). If you wish to change the log level, you can pass in `-v=X` where X is the desired maximum level to log.
|
||||||
|
@ -42,11 +42,13 @@ API_HOST=${API_HOST:-127.0.0.1}
|
|||||||
# By default only allow CORS for requests on localhost
|
# By default only allow CORS for requests on localhost
|
||||||
API_CORS_ALLOWED_ORIGINS=${API_CORS_ALLOWED_ORIGINS:-"/127.0.0.1(:[0-9]+)?$,/localhost(:[0-9]+)?$"}
|
API_CORS_ALLOWED_ORIGINS=${API_CORS_ALLOWED_ORIGINS:-"/127.0.0.1(:[0-9]+)?$,/localhost(:[0-9]+)?$"}
|
||||||
KUBELET_PORT=${KUBELET_PORT:-10250}
|
KUBELET_PORT=${KUBELET_PORT:-10250}
|
||||||
|
LOG_LEVEL=${LOG_LEVEL:-3}
|
||||||
|
|
||||||
GO_OUT=$(dirname $0)/../_output/go/bin
|
GO_OUT=$(dirname $0)/../_output/go/bin
|
||||||
|
|
||||||
APISERVER_LOG=/tmp/apiserver.log
|
APISERVER_LOG=/tmp/apiserver.log
|
||||||
"${GO_OUT}/apiserver" \
|
"${GO_OUT}/apiserver" \
|
||||||
|
-v=${LOG_LEVEL} \
|
||||||
--address="${API_HOST}" \
|
--address="${API_HOST}" \
|
||||||
--port="${API_PORT}" \
|
--port="${API_PORT}" \
|
||||||
--etcd_servers="http://127.0.0.1:4001" \
|
--etcd_servers="http://127.0.0.1:4001" \
|
||||||
@ -59,11 +61,13 @@ wait_for_url "http://$API_HOST:$API_PORT/api/v1beta1/pods" "apiserver: "
|
|||||||
|
|
||||||
CTLRMGR_LOG=/tmp/controller-manager.log
|
CTLRMGR_LOG=/tmp/controller-manager.log
|
||||||
"${GO_OUT}/controller-manager" \
|
"${GO_OUT}/controller-manager" \
|
||||||
|
-v=${LOG_LEVEL} \
|
||||||
--master="${API_HOST}:${API_PORT}" >"${CTLRMGR_LOG}" 2>&1 &
|
--master="${API_HOST}:${API_PORT}" >"${CTLRMGR_LOG}" 2>&1 &
|
||||||
CTLRMGR_PID=$!
|
CTLRMGR_PID=$!
|
||||||
|
|
||||||
KUBELET_LOG=/tmp/kubelet.log
|
KUBELET_LOG=/tmp/kubelet.log
|
||||||
"${GO_OUT}/kubelet" \
|
"${GO_OUT}/kubelet" \
|
||||||
|
-v=${LOG_LEVEL} \
|
||||||
--etcd_servers="http://127.0.0.1:4001" \
|
--etcd_servers="http://127.0.0.1:4001" \
|
||||||
--hostname_override="127.0.0.1" \
|
--hostname_override="127.0.0.1" \
|
||||||
--address="127.0.0.1" \
|
--address="127.0.0.1" \
|
||||||
@ -72,11 +76,13 @@ KUBELET_PID=$!
|
|||||||
|
|
||||||
PROXY_LOG=/tmp/kube-proxy.log
|
PROXY_LOG=/tmp/kube-proxy.log
|
||||||
"${GO_OUT}/proxy" \
|
"${GO_OUT}/proxy" \
|
||||||
|
-v=${LOG_LEVEL} \
|
||||||
--master="http://${API_HOST}:${API_PORT}" >"${PROXY_LOG}" 2>&1 &
|
--master="http://${API_HOST}:${API_PORT}" >"${PROXY_LOG}" 2>&1 &
|
||||||
PROXY_PID=$!
|
PROXY_PID=$!
|
||||||
|
|
||||||
SCHEDULER_LOG=/tmp/k8s-scheduler.log
|
SCHEDULER_LOG=/tmp/k8s-scheduler.log
|
||||||
"${GO_OUT}/scheduler" \
|
"${GO_OUT}/scheduler" \
|
||||||
|
-v=${LOG_LEVEL} \
|
||||||
--master="http://${API_HOST}:${API_PORT}" >"${SCHEDULER_LOG}" 2>&1 &
|
--master="http://${API_HOST}:${API_PORT}" >"${SCHEDULER_LOG}" 2>&1 &
|
||||||
SCHEDULER_PID=$!
|
SCHEDULER_PID=$!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user