wip
This commit is contained in:
parent
3f3e8b4a2d
commit
e175d00fed
|
@ -63,6 +63,9 @@ func (f *FileSource) Configure(Config []byte, logger *log.Entry) error {
|
||||||
if f.config.Mode == "" {
|
if f.config.Mode == "" {
|
||||||
f.config.Mode = configuration.TAIL_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()
|
f.watcher, err = fsnotify.NewWatcher()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "Could not create fsnotify watcher")
|
return errors.Wrapf(err, "Could not create fsnotify watcher")
|
||||||
|
|
Loading…
Reference in a new issue