summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2020-12-10 17:39:57 +0100
committerPaul Holzinger <paul.holzinger@web.de>2020-12-10 22:24:43 +0100
commitba545c49a216d20be83bdfb0357a4d5f0abe6800 (patch)
tree8b00fa4a88408ed594f2b5e04116b7bcdd933b67 /cmd/podman
parent2bb149034bd67dd4027768863fed2fce853833ae (diff)
downloadpodman-ba545c49a216d20be83bdfb0357a4d5f0abe6800.tar.gz
podman-ba545c49a216d20be83bdfb0357a4d5f0abe6800.tar.bz2
podman-ba545c49a216d20be83bdfb0357a4d5f0abe6800.zip
podman logs honor stderr correctly
Make the ContainerLogsOptions support two io.Writers, one for stdout and the other for stderr. The logline already includes the information to which Writer it has to be written. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/logs.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/containers/logs.go b/cmd/podman/containers/logs.go
index d4ede370a..9b562afd8 100644
--- a/cmd/podman/containers/logs.go
+++ b/cmd/podman/containers/logs.go
@@ -122,6 +122,7 @@ func logs(_ *cobra.Command, args []string) error {
}
logsOptions.Since = since
}
- logsOptions.Writer = os.Stdout
+ logsOptions.StdoutWriter = os.Stdout
+ logsOptions.StderrWriter = os.Stderr
return registry.ContainerEngine().ContainerLogs(registry.GetContext(), args, logsOptions.ContainerLogsOptions)
}