summaryrefslogtreecommitdiff
path: root/pkg/adapter/runtime.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-03-27 13:50:54 -0500
committerbaude <bbaude@redhat.com>2019-04-24 16:00:04 -0500
commit7bf7c177ab3f67d5de1689842204c258fca083e4 (patch)
tree960fd1365913209fec61e3226b96a6f8bb1fd051 /pkg/adapter/runtime.go
parentd75543fcd2ce87a9b87b8883400f355979004e91 (diff)
downloadpodman-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/adapter/runtime.go')
-rw-r--r--pkg/adapter/runtime.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go
index 753f7c944..255f844d2 100644
--- a/pkg/adapter/runtime.go
+++ b/pkg/adapter/runtime.go
@@ -5,6 +5,7 @@ package adapter
import (
"bufio"
"context"
+ "github.com/containers/libpod/cmd/podman/shared"
"io"
"io/ioutil"
"os"
@@ -17,7 +18,6 @@ import (
"github.com/containers/image/types"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/libpodruntime"
- "github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/events"
"github.com/containers/libpod/libpod/image"
@@ -322,10 +322,6 @@ func (r *LocalRuntime) Events(c *cliconfig.EventValues) error {
fromStart bool
eventsError error
)
- options, err := shared.GenerateEventOptions(c.Filter, c.Since, c.Until)
- if err != nil {
- return errors.Wrapf(err, "unable to generate event options")
- }
tmpl, err := template.New("events").Parse(c.Format)
if err != nil {
return err
@@ -335,7 +331,8 @@ func (r *LocalRuntime) Events(c *cliconfig.EventValues) error {
}
eventChannel := make(chan *events.Event)
go func() {
- eventsError = r.Runtime.Events(fromStart, c.Stream, options, eventChannel)
+ readOpts := events.ReadOptions{FromStart: fromStart, Stream: c.Stream, Filters: c.Filter, EventChannel: eventChannel, Since: c.Since, Until: c.Until}
+ eventsError = r.Runtime.Events(readOpts)
}()
if eventsError != nil {