diff --git a/filebeat/autodiscover/builder/hints/logs.go b/filebeat/autodiscover/builder/hints/logs.go index 8685776b1502..5707f61cfef9 100644 --- a/filebeat/autodiscover/builder/hints/logs.go +++ b/filebeat/autodiscover/builder/hints/logs.go @@ -186,7 +186,7 @@ func (l *logHints) getFilesets(hints common.MapStr, module string) map[string]*f moduleFilesets, err := l.Registry.ModuleFilesets(module) if err != nil { - logp.Err("Error retrieving module filesets", err) + logp.Err("Error retrieving module filesets: %+v", err) return nil } diff --git a/filebeat/input/log/input.go b/filebeat/input/log/input.go index afba5fb42202..cc8d575f8a8d 100644 --- a/filebeat/input/log/input.go +++ b/filebeat/input/log/input.go @@ -510,7 +510,7 @@ func (p *Input) harvestExistingFile(newState file.State, oldState file.State) { // File size was reduced -> truncated file if oldState.Finished && newState.Fileinfo.Size() < oldState.Offset { - logp.Debug("input", "Old file was truncated. Starting from the beginning: %s, offset: %d, new size: %d ", newState.Source, newState.Fileinfo.Size()) + logp.Debug("input", "Old file was truncated. Starting from the beginning: %s, offset: %d, new size: %d ", newState.Source, oldState.Offset, newState.Fileinfo.Size()) err := p.startHarvester(newState, 0) if err != nil { logp.Err("Harvester could not be started on truncated file: %s, Err: %s", newState.Source, err) diff --git a/filebeat/reader/readfile/line.go b/filebeat/reader/readfile/line.go index be2714b498f1..a2656884868d 100644 --- a/filebeat/reader/readfile/line.go +++ b/filebeat/reader/readfile/line.go @@ -87,7 +87,7 @@ func (r *LineReader) Next() ([]byte, int, error) { if buf[len(buf)-1] == '\n' { break } else { - logp.Debug("line", "Line ending char found which wasn't one: %s", buf[len(buf)-1]) + logp.Debug("line", "Line ending char found which wasn't one: %s", string(buf[len(buf)-1])) } }