PR #2911 enabled logrus to show information about log
caller, if --debug is set.
The problem is, the file name and in many cases the function name have a
long prefix of github.com/opencontainers/runc (this is with -trimpath used
during compilation, and without it it's even worse).
Here's how it looks like:
$ runc --debug run x
ERRO[0000]github.com/opencontainers/runc/utils.go:61 main.fatalWithCode() JSON specification file config.json not found
It is worse when log is printed not from the main package:
INFO[0000]github.com/opencontainers/runc/libcontainer/specconv/spec_linux.go:350 github.com/opencontainers/runc/libcontainer/specconv.createLibcontainerMount() cgroup data: %snsdelegate
Ideally, it should look like:
$ runc --debug run x
ERRO[0000]utils.go:61 main.fatalWithCode() JSON specification file config.json not found
INFO[0000]libcontainer/specconv/spec_linux.go:350 libcontainer/specconv.createLibcontainerMount() cgroup data: %snsdelegate
Note all this happens only when --debug is given.
PR #2911 enabled logrus to show information about log
caller, if
--debugis set.The problem is, the file name and in many cases the function name have a
long prefix of
github.com/opencontainers/runc(this is with-trimpathusedduring compilation, and without it it's even worse).
Here's how it looks like:
It is worse when log is printed not from the main package:
Ideally, it should look like:
Note all this happens only when
--debugis given.