diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-10-11 14:28:15 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-10-11 14:29:37 -0700 |
commit | e68d86e1bd47f7905e4452f7ce0e04e683561f85 (patch) | |
tree | f5e9ff902d3efbee1c33c9f2d5064f57cde977d2 /runsc/sandbox | |
parent | 96c68b36f67355295339e8039712b28d272e083e (diff) |
Make debug log file name configurable
This is a breaking change if you're using --debug-log-dir.
The fix is to replace it with --debug-log and add a '/' at
the end:
--debug-log-dir=/tmp/runsc ==> --debug-log=/tmp/runsc/
PiperOrigin-RevId: 216761212
Change-Id: I244270a0a522298c48115719fa08dad55e34ade1
Diffstat (limited to 'runsc/sandbox')
-rw-r--r-- | runsc/sandbox/sandbox.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runsc/sandbox/sandbox.go b/runsc/sandbox/sandbox.go index 37a3efd09..a0de4a175 100644 --- a/runsc/sandbox/sandbox.go +++ b/runsc/sandbox/sandbox.go @@ -291,10 +291,10 @@ func (s *Sandbox) createSandboxProcess(spec *specs.Spec, conf *boot.Config, bund cmd.Args = append(cmd.Args, "--log-fd="+strconv.Itoa(nextFD)) nextFD++ } - if conf.DebugLogDir != "" { - debugLogFile, err := specutils.DebugLogFile(conf.DebugLogDir, "boot") + if conf.DebugLog != "" { + debugLogFile, err := specutils.DebugLogFile(conf.DebugLog, "boot") if err != nil { - return fmt.Errorf("error opening debug log file in %q: %v", conf.DebugLogDir, err) + return fmt.Errorf("error opening debug log file in %q: %v", conf.DebugLog, err) } defer debugLogFile.Close() cmd.ExtraFiles = append(cmd.ExtraFiles, debugLogFile) |