This commit is contained in:
Sebastien Blot 2021-04-30 12:24:16 +02:00
parent 61ac2ef8ff
commit 3f3e8b4a2d
No known key found for this signature in database
GPG key ID: DFC2902F40449F6A

View file

@ -60,6 +60,9 @@ func (f *FileSource) Configure(Config []byte, logger *log.Entry) error {
return fmt.Errorf("no filename or filenames configuration provided")
}
f.config = fileConfig
if f.config.Mode == "" {
f.config.Mode = configuration.TAIL_MODE
}
f.watcher, err = fsnotify.NewWatcher()
if err != nil {
return errors.Wrapf(err, "Could not create fsnotify watcher")