mirror of
https://github.com/containers/podman.git
synced 2025-10-17 03:04:21 +08:00
logging: new mode -l passthrough
it allows to pass the current std streams down to the container. conmon support: https://github.com/containers/conmon/pull/289 [NO TESTS NEEDED] it needs a new conmon. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -18,7 +18,7 @@ import (
|
||||
var logDrivers []string
|
||||
|
||||
func init() {
|
||||
logDrivers = append(logDrivers, define.KubernetesLogging, define.NoLogging)
|
||||
logDrivers = append(logDrivers, define.KubernetesLogging, define.NoLogging, define.PassthroughLogging)
|
||||
}
|
||||
|
||||
// Log is a runtime function that can read one or more container logs.
|
||||
@ -34,6 +34,8 @@ func (r *Runtime) Log(ctx context.Context, containers []*Container, options *log
|
||||
// ReadLog reads a containers log based on the input options and returns log lines over a channel.
|
||||
func (c *Container) ReadLog(ctx context.Context, options *logs.LogOptions, logChannel chan *logs.LogLine) error {
|
||||
switch c.LogDriver() {
|
||||
case define.PassthroughLogging:
|
||||
return errors.Wrapf(define.ErrNoLogs, "this container is using the 'passthrough' log driver, cannot read logs")
|
||||
case define.NoLogging:
|
||||
return errors.Wrapf(define.ErrNoLogs, "this container is using the 'none' log driver, cannot read logs")
|
||||
case define.JournaldLogging:
|
||||
|
Reference in New Issue
Block a user