mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
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:
parent
72e919f4b3
commit
5201049f2c
@ -202,7 +202,7 @@ func start(ctx context.Context, service, sock, basePath, dumpSpec string) (strin
|
|||||||
|
|
||||||
io := func(id string) (cio.IO, error) {
|
io := func(id string) (cio.IO, error) {
|
||||||
stdoutFile := logger.Path(service + ".out")
|
stdoutFile := logger.Path(service + ".out")
|
||||||
stderrFile := logger.Path(service + ".err")
|
stderrFile := logger.Path(service)
|
||||||
return &logio{
|
return &logio{
|
||||||
cio.Config{
|
cio.Config{
|
||||||
Stdin: "/dev/null",
|
Stdin: "/dev/null",
|
||||||
|
@ -87,7 +87,7 @@ func runcInit(rootPath, serviceType string) int {
|
|||||||
}
|
}
|
||||||
defer stdout.Close()
|
defer stdout.Close()
|
||||||
|
|
||||||
stderrLog := serviceType + "." + name + ".err"
|
stderrLog := serviceType + "." + name
|
||||||
stderr, err := logger.Open(stderrLog)
|
stderr, err := logger.Open(stderrLog)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error opening stderr log connection: %v", err)
|
log.Printf("Error opening stderr log connection: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user