journald: remove initializeJournal()

This was added as hack in commit 6b06e9b77c because the journald logs
code was not able to handle an empty journal. But since commit
767947ab88 this is no longer the case, we correctly use the sd_journal
API and know when the journal is empty.

Therefore we no longer need this hack and it should be removed because
it just adds overhead and an empty journal entry for no good reason.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-02-15 21:00:26 +01:00
parent 33622f7df4
commit 21cddd7235
3 changed files with 1 additions and 25 deletions

View File

@ -14,7 +14,3 @@ import (
func (c *Container) readFromJournal(_ context.Context, _ *logs.LogOptions, _ chan *logs.LogLine, colorID int64) error {
return fmt.Errorf("journald logging only enabled with systemd on linux: %w", define.ErrOSNotSupported)
}
func (c *Container) initializeJournal(ctx context.Context) error {
return fmt.Errorf("journald logging only enabled with systemd on linux: %w", define.ErrOSNotSupported)
}