mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Improve nsexec logging
* Simplify logging function * Logs contain __FUNCTION__:__LINE__ * Bail uses write_log Co-authored-by: Julia Nedialkova <julianedialkova@hotmail.com> Co-authored-by: Danail Branekov <danailster@gmail.com> Signed-off-by: Georgi Sabev <georgethebeatle@gmail.com>
This commit is contained in:
@@ -136,6 +136,12 @@ func execProcess(context *cli.Context) (int, error) {
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
|
||||
logLevel := "info"
|
||||
if context.GlobalBool("debug") {
|
||||
logLevel = "debug"
|
||||
}
|
||||
|
||||
r := &runner{
|
||||
enableSubreaper: false,
|
||||
shouldDestroy: false,
|
||||
@@ -146,6 +152,7 @@ func execProcess(context *cli.Context) (int, error) {
|
||||
action: CT_ACT_RUN,
|
||||
init: false,
|
||||
preserveFDs: context.Int("preserve-fds"),
|
||||
logLevel: logLevel,
|
||||
}
|
||||
return r.run(p)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user