Modifying the Proxy Log Level
Emitting logs is an expensive operation for a network proxy, and by default,the Linkerd data plane proxies are configured to only log exceptional events.However, sometimes it is useful to increase the verbosity of proxy logs toassist with diagnosing proxy behavior. Happily, Linkerd allows you to modifythese logs dynamically.
The log level of a Linkerd proxy can be modified on the fly by using the proxy's/proxy-log-level
endpoint.
For example, to change the proxy log level of the web-c4d87867-h7sdx
pod todebug
, run:
kubectl port-forward -n emojivoto web-c4d87867-h7sdx 4191
curl -v --data 'linkerd=debug' -X PUT localhost:4191/proxy-log-level
The resulting logs can be viewed with kubectl logs
.
If changes to the proxy log level should be retained beyond the lifetime of apod, add the config.linkerd.io/proxy-log-level
annotation to the podtemplate.
The syntax of the proxy log level can be found in the proxy log levelreference.
Note that logging has a noticeable, negative impact on proxy throughput. If thepod will continue to serve production traffic, you may wish to reset the loglevel once you are done.