mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Support for logging from children processes
Add support for children processes logging (including nsexec). A pipe is used to send logs from children to parent in JSON. The JSON format used is the same used by logrus JSON formatted, i.e. children process can use standard logrus APIs. Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
committed by
Danail Branekov
parent
029124da7a
commit
9a599f62fb
@@ -133,6 +133,12 @@ func main() {
|
||||
updateCommand,
|
||||
}
|
||||
app.Before = func(context *cli.Context) error {
|
||||
|
||||
// do nothing if logrus was already initialized in init.go
|
||||
if logrus.StandardLogger().Out != logrus.New().Out {
|
||||
return nil
|
||||
}
|
||||
|
||||
if context.GlobalBool("debug") {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user