diff options
author | baude <bbaude@redhat.com> | 2019-03-27 13:50:54 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-04-24 16:00:04 -0500 |
commit | 7bf7c177ab3f67d5de1689842204c258fca083e4 (patch) | |
tree | 960fd1365913209fec61e3226b96a6f8bb1fd051 /pkg/varlinkapi | |
parent | d75543fcd2ce87a9b87b8883400f355979004e91 (diff) | |
download | podman-7bf7c177ab3f67d5de1689842204c258fca083e4.tar.gz podman-7bf7c177ab3f67d5de1689842204c258fca083e4.tar.bz2 podman-7bf7c177ab3f67d5de1689842204c258fca083e4.zip |
journald event logging
add the ability for podman to read and write events to journald instead
of just a logfile. This can be controlled in libpod.conf with the
`events_logger` attribute of `journald` or `file`. The default will be
set to `journald`.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r-- | pkg/varlinkapi/events.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pkg/varlinkapi/events.go b/pkg/varlinkapi/events.go index 1e5696fbe..f9a9d9321 100644 --- a/pkg/varlinkapi/events.go +++ b/pkg/varlinkapi/events.go @@ -6,7 +6,6 @@ import ( "fmt" "time" - "github.com/containers/libpod/cmd/podman/shared" "github.com/containers/libpod/cmd/podman/varlink" "github.com/containers/libpod/libpod/events" ) @@ -23,19 +22,16 @@ func (i *LibpodAPI) GetEvents(call iopodman.VarlinkCall, filter []string, since stream = true call.Continues = true } - filters, err := shared.GenerateEventOptions(filter, since, until) - if err != nil { - return call.ReplyErrorOccurred(err.Error()) - } if len(since) > 0 || len(until) > 0 { fromStart = true } eventChannel := make(chan *events.Event) go func() { - eventsError = i.Runtime.Events(fromStart, stream, filters, eventChannel) + readOpts := events.ReadOptions{FromStart: fromStart, Stream: stream, Filters: filter, EventChannel: eventChannel} + eventsError = i.Runtime.Events(readOpts) }() if eventsError != nil { - return call.ReplyErrorOccurred(err.Error()) + return call.ReplyErrorOccurred(eventsError.Error()) } for { event = <-eventChannel |