Commit Graph

3 Commits

Author SHA1 Message Date
Sylvain Rabot
7e7b01fa31 Log real file's name and line
pkg/kubectl/util/logs & staging/src/k8s.io/apiserver/pkg/util/logs
use `glog.info(...)` but this function is not made to be wrapped because
the underlying mechanism use a fixed call trace length to determine
where the log has been emited.

This results is having `logs.go:49` in the logs which is in the body
of the wrapper function and thus useless.

Instead use `glog.infoDepth(1, ...)` which tells the underlying mechanism
to go back 1 more level in the call trace to determine where the log
has been emitted.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2018-08-11 14:57:45 +02:00
xuzhonghu
46d8cf23ef kubectl use its own logs 2018-05-22 11:35:38 +08:00
ymqytw
d7659dffff move logs to kubectl/util 2017-08-10 11:30:26 -07:00