Skip to content

Commit eab45e1

Browse files
authored
Merge pull request #250 from Allsimon/journald
improve error logs in journald reader
2 parents 8cf468b + ca58191 commit eab45e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

logs/journald_reader.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ func NewJournaldReader(journalPaths ...string) (*JournaldReader, error) {
2626
var err error
2727
for _, journalPath := range journalPaths {
2828
if r.journal, err = sdjournal.NewJournalFromDir(journalPath); err != nil {
29+
klog.Errorf("failed to get journal at %s: %s", journalPath, err)
2930
continue
3031
}
3132
usage, err := r.journal.GetUsage()
3233
if err != nil {
34+
klog.Errorf("failed to read journal disk space usage at %s: %s", journalPath, err)
3335
continue
3436
}
3537
if usage == 0 {
38+
klog.Errorf("journal at %s is empty", journalPath)
3639
r.journal = nil
3740
continue
3841
}

0 commit comments

Comments
 (0)