summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-15 21:03:17 +0200
committerGitHub <noreply@github.com>2019-05-15 21:03:17 +0200
commit000106ce38bed2af2f850419d6b658b7e428d05d (patch)
treea0402e9fca462c504b723409a140cf4a7f3c0e12 /libpod
parenta261b60cc8851c04efd191be6f6e2e4598439822 (diff)
parent7a58c6601b8aaaf3ae04f7b49ec3c638f55b40ad (diff)
downloadpodman-000106ce38bed2af2f850419d6b658b7e428d05d.tar.gz
podman-000106ce38bed2af2f850419d6b658b7e428d05d.tar.bz2
podman-000106ce38bed2af2f850419d6b658b7e428d05d.zip
Merge pull request #3128 from baude/eventssetdefault
set default event logger based on build tags
Diffstat (limited to 'libpod')
-rw-r--r--libpod/events/journal_linux.go3
-rw-r--r--libpod/events/journal_unsupported.go3
-rw-r--r--libpod/runtime.go2
3 files changed, 7 insertions, 1 deletions
diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go
index 264c84f89..78a630e9a 100644
--- a/libpod/events/journal_linux.go
+++ b/libpod/events/journal_linux.go
@@ -12,6 +12,9 @@ import (
"github.com/sirupsen/logrus"
)
+// DefaultEventerType is journald when systemd is available
+const DefaultEventerType = Journald
+
// EventJournalD is the journald implementation of an eventer
type EventJournalD struct {
options EventerOptions
diff --git a/libpod/events/journal_unsupported.go b/libpod/events/journal_unsupported.go
index c91d81f12..004efdab2 100644
--- a/libpod/events/journal_unsupported.go
+++ b/libpod/events/journal_unsupported.go
@@ -2,6 +2,9 @@
package events
+// DefaultEventerType is logfile when systemd is not present
+const DefaultEventerType = LogFile
+
// newEventJournalD always returns an error if libsystemd not found
func newEventJournalD(options EventerOptions) (Eventer, error) {
return nil, ErrNoJournaldLogging
diff --git a/libpod/runtime.go b/libpod/runtime.go
index e6b84014e..18e9dfeb3 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -304,7 +304,7 @@ func defaultRuntimeConfig() (RuntimeConfig, error) {
EnablePortReservation: true,
EnableLabeling: true,
NumLocks: 2048,
- EventsLogger: "journald",
+ EventsLogger: events.DefaultEventerType.String(),
}, nil
}