-
Notifications
You must be signed in to change notification settings - Fork 2.3k
runc debug log file paths and function names are too long #3184
Copy link
Copy link
Closed
Labels
Description
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 foundIt 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 foundINFO[0000]libcontainer/specconv/spec_linux.go:350 libcontainer/specconv.createLibcontainerMount() cgroup data: %snsdelegate
Note all this happens only when --debug is given.
Reactions are currently unavailable