summaryrefslogtreecommitdiff
path: root/libpod/image/image.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-04-25 12:20:39 -0700
committerGitHub <noreply@github.com>2019-04-25 12:20:39 -0700
commit01e79477ca75df54836944a94eb4840c9e9f49e1 (patch)
tree8b76672f2a4e83b0c8334132dca92e3b1279ba14 /libpod/image/image.go
parente900e95f9aa6a22eeef9f78573dfb88df2f10d49 (diff)
parent7bf7c177ab3f67d5de1689842204c258fca083e4 (diff)
downloadpodman-01e79477ca75df54836944a94eb4840c9e9f49e1.tar.gz
podman-01e79477ca75df54836944a94eb4840c9e9f49e1.tar.bz2
podman-01e79477ca75df54836944a94eb4840c9e9f49e1.zip
Merge pull request #2850 from baude/eventsjournald
journald event logging
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r--libpod/image/image.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 0b0002d42..b965a4640 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -66,6 +66,8 @@ type Runtime struct {
store storage.Store
SignaturePolicyPath string
EventsLogFilePath string
+ EventsLogger string
+ Eventer events.Eventer
}
// InfoImage keep information of Image along with all associated layers
@@ -1366,7 +1368,7 @@ func (ir *Runtime) newImageEvent(status events.Status, name string) {
e := events.NewEvent(status)
e.Type = events.Image
e.Name = name
- if err := e.Write(ir.EventsLogFilePath); err != nil {
+ if err := ir.Eventer.Write(e); err != nil {
logrus.Infof("unable to write event to %s", ir.EventsLogFilePath)
}
}
@@ -1379,7 +1381,7 @@ func (i *Image) newImageEvent(status events.Status) {
if len(i.Names()) > 0 {
e.Name = i.Names()[0]
}
- if err := e.Write(i.imageruntime.EventsLogFilePath); err != nil {
+ if err := i.imageruntime.Eventer.Write(e); err != nil {
logrus.Infof("unable to write event to %s", i.imageruntime.EventsLogFilePath)
}
}