wip
This commit is contained in:
parent
3f3e8b4a2d
commit
e175d00fed
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,9 @@ func (f *FileSource) Configure(Config []byte, logger *log.Entry) error {
|
|||
if f.config.Mode == "" {
|
||||
f.config.Mode = configuration.TAIL_MODE
|
||||
}
|
||||
if f.config.Mode != configuration.CAT_MODE && f.config.Mode != configuration.TAIL_MODE {
|
||||
return fmt.Errorf("unsupported mode %s for file source", f.config.Mode)
|
||||
}
|
||||
f.watcher, err = fsnotify.NewWatcher()
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "Could not create fsnotify watcher")
|
||||
|
|
Loading…
Add table
Reference in a new issue