diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-06-24 22:11:11 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-24 22:11:11 +0000 |
commit | 30b2aa26b5fcd11c589e910ffad05dc85a9c35d2 (patch) | |
tree | 401f933ab46e2e03d308fe36c2c8d6af9c158de4 /runsc/sandbox | |
parent | d01228b4707699238b93057065748e9391113358 (diff) | |
parent | b21b1db7003aea8615ab9e6a4f07b74c97a32c24 (diff) |
Merge b21b1db7 (automated)
Diffstat (limited to 'runsc/sandbox')
-rw-r--r-- | runsc/sandbox/sandbox.go | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go index 3bd0291c0..52a5dfd77 100644 --- a/runsc/sandbox/sandbox.go +++ b/runsc/sandbox/sandbox.go @@ -960,7 +960,7 @@ func (s *Sandbox) StartTrace(f *os.File) error { return nil } -// StopTrace stops a previously started trace.. +// StopTrace stops a previously started trace. func (s *Sandbox) StopTrace() error { log.Debugf("Trace stop %q", s.ID) conn, err := s.sandboxConnect() @@ -975,6 +975,21 @@ func (s *Sandbox) StopTrace() error { return nil } +// ChangeLogging changes logging options. +func (s *Sandbox) ChangeLogging(args control.LoggingArgs) error { + log.Debugf("Change logging start %q", s.ID) + conn, err := s.sandboxConnect() + if err != nil { + return err + } + defer conn.Close() + + if err := conn.Call(boot.ChangeLogging, &args, nil); err != nil { + return fmt.Errorf("changing sandbox %q logging: %v", s.ID, err) + } + return nil +} + // DestroyContainer destroys the given container. If it is the root container, // then the entire sandbox is destroyed. func (s *Sandbox) DestroyContainer(cid string) error { |