pkg/init: write stderr to <name> rather than <name>.err

This will then be written to disk as <name>.log by logwrite.

Part of #3111

Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
David Scott 2018-07-13 10:47:05 +01:00
parent 72e919f4b3
commit 5201049f2c
2 changed files with 2 additions and 2 deletions

View File

@ -202,7 +202,7 @@ func start(ctx context.Context, service, sock, basePath, dumpSpec string) (strin
io := func(id string) (cio.IO, error) {
stdoutFile := logger.Path(service + ".out")
stderrFile := logger.Path(service + ".err")
stderrFile := logger.Path(service)
return &logio{
cio.Config{
Stdin: "/dev/null",

View File

@ -87,7 +87,7 @@ func runcInit(rootPath, serviceType string) int {
}
defer stdout.Close()
stderrLog := serviceType + "." + name + ".err"
stderrLog := serviceType + "." + name
stderr, err := logger.Open(stderrLog)
if err != nil {
log.Printf("Error opening stderr log connection: %v", err)