aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-06-15 00:49:10 -0400
committerGitHub <noreply@github.com>2022-06-15 00:49:10 -0400
commitcab97798bfe8fecd597693255f5a054bd5b7d459 (patch)
treefad656362266ac5bba3e64282b86906e010b0615 /libpod
parente084f0ee1e1ded564110e84eefca9f18b5669adf (diff)
parent1b62e4543845907ffba61086a79883751abca819 (diff)
downloadpodman-cab97798bfe8fecd597693255f5a054bd5b7d459.tar.gz
podman-cab97798bfe8fecd597693255f5a054bd5b7d459.tar.bz2
podman-cab97798bfe8fecd597693255f5a054bd5b7d459.zip
Merge pull request #14584 from Luap99/lint-systemd
golangci-lint: add systemd build tag
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_log_linux.go7
-rw-r--r--libpod/events/journal_linux.go3
2 files changed, 5 insertions, 5 deletions
diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go
index deb726526..7f90332c7 100644
--- a/libpod/container_log_linux.go
+++ b/libpod/container_log_linux.go
@@ -292,11 +292,12 @@ func formatterPrefix(entry *sdjournal.JournalEntry) (string, error) {
if !ok {
return "", errors.Errorf("no PRIORITY field present in journal entry")
}
- if priority == journaldLogOut {
+ switch priority {
+ case journaldLogOut:
output += "stdout "
- } else if priority == journaldLogErr {
+ case journaldLogErr:
output += "stderr "
- } else {
+ default:
return "", errors.Errorf("unexpected PRIORITY field in journal entry")
}
diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go
index 866042a4c..4db87c14d 100644
--- a/libpod/events/journal_linux.go
+++ b/libpod/events/journal_linux.go
@@ -64,7 +64,7 @@ func (e EventJournalD) Write(ee Event) error {
case Volume:
m["PODMAN_NAME"] = ee.Name
}
- return journal.Send(string(ee.ToHumanReadable(false)), journal.PriInfo, m)
+ return journal.Send(ee.ToHumanReadable(false), journal.PriInfo, m)
}
// Read reads events from the journal and sends qualified events to the event channel
@@ -167,7 +167,6 @@ func (e EventJournalD) Read(ctx context.Context, options ReadOptions) error {
}
}
return nil
-
}
func newEventFromJournalEntry(entry *sdjournal.JournalEntry) (*Event, error) { //nolint