diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-04-25 12:20:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-25 12:20:39 -0700 |
commit | 01e79477ca75df54836944a94eb4840c9e9f49e1 (patch) | |
tree | 8b76672f2a4e83b0c8334132dca92e3b1279ba14 /libpod/events/events_linux.go | |
parent | e900e95f9aa6a22eeef9f78573dfb88df2f10d49 (diff) | |
parent | 7bf7c177ab3f67d5de1689842204c258fca083e4 (diff) | |
download | podman-01e79477ca75df54836944a94eb4840c9e9f49e1.tar.gz podman-01e79477ca75df54836944a94eb4840c9e9f49e1.tar.bz2 podman-01e79477ca75df54836944a94eb4840c9e9f49e1.zip |
Merge pull request #2850 from baude/eventsjournald
journald event logging
Diffstat (limited to 'libpod/events/events_linux.go')
-rw-r--r-- | libpod/events/events_linux.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libpod/events/events_linux.go b/libpod/events/events_linux.go new file mode 100644 index 000000000..d6898145c --- /dev/null +++ b/libpod/events/events_linux.go @@ -0,0 +1,20 @@ +package events + +import ( + "github.com/pkg/errors" + "strings" +) + +// NewEventer creates an eventer based on the eventer type +func NewEventer(options EventerOptions) (Eventer, error) { + var eventer Eventer + switch strings.ToUpper(options.EventerType) { + case strings.ToUpper(Journald.String()): + eventer = EventJournalD{options} + case strings.ToUpper(LogFile.String()): + eventer = EventLogFile{options} + default: + return eventer, errors.Errorf("unknown event logger type: %s", strings.ToUpper(options.EventerType)) + } + return eventer, nil +} |