From 1f85f3191bf800194ea22ef085a6819524a6099f Mon Sep 17 00:00:00 2001 From: kongfei Date: Thu, 2 Jun 2022 21:23:02 +0800 Subject: [PATCH] shield some debug log --- logs/input/file/scanner.go | 2 +- logs/input/file/tailer_nix.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/logs/input/file/scanner.go b/logs/input/file/scanner.go index 308f0b4..263bb6f 100644 --- a/logs/input/file/scanner.go +++ b/logs/input/file/scanner.go @@ -260,7 +260,7 @@ func (s *Scanner) startNewTailer(file *File, m logsconfig.TailingMode) bool { log.Println("W! Could not recover offset for file with path", file.Path, err) } - log.Printf("Starting a new tailer for: %s (offset: %d, whence: %d) for tailer key %s\n", file.Path, offset, whence, file.GetScanKey()) + // log.Printf("Starting a new tailer for: %s (offset: %d, whence: %d) for tailer key %s\n", file.Path, offset, whence, file.GetScanKey()) err = tailer.Start(offset, whence) if err != nil { log.Println(err) diff --git a/logs/input/file/tailer_nix.go b/logs/input/file/tailer_nix.go index 8dc7efd..5cdc70a 100644 --- a/logs/input/file/tailer_nix.go +++ b/logs/input/file/tailer_nix.go @@ -11,7 +11,6 @@ package file import ( "fmt" "io" - "log" "path/filepath" "flashcat.cloud/categraf/logs/decoder" @@ -28,7 +27,7 @@ func (t *Tailer) setup(offset int64, whence int) error { // adds metadata to enable users to filter logs by filename t.tags = t.buildTailerTags() - log.Println("I! Opening", t.file.Path, "for tailer key", t.file.GetScanKey()) + // log.Println("I! Opening", t.file.Path, "for tailer key", t.file.GetScanKey()) f, err := openFile(fullpath) if err != nil { return err