Skip to content

Commit

Permalink
watching_dir is not required
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryRomanov committed Apr 19, 2024
1 parent 3e21aba commit 5446e1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions plugin/input/file/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ pipelines:
```
### Config params
**`watching_dir`** *`string`* *`required`*
**`watching_dir`** *`string`*

List of included pathes
*`string`* *`required`*
*`string`*

List of excluded pathes
*`string`* *`required`*
*`string`*

The source directory to watch for files to process. All subdirectories also will be watched. E.g. if files have
`/var/my-logs/$YEAR/$MONTH/$DAY/$HOST/$FACILITY-$PROGRAM.log` structure, `watching_dir` should be `/var/my-logs`.
Expand Down
2 changes: 1 addition & 1 deletion plugin/input/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type Config struct {
// > `/var/my-logs/$YEAR/$MONTH/$DAY/$HOST/$FACILITY-$PROGRAM.log` structure, `watching_dir` should be `/var/my-logs`.
// > Also the `filename_pattern`/`dir_pattern` is useful to filter needless files/subdirectories. In the case of using two or more
// > different directories, it's recommended to setup separate pipelines for each.
WatchingDir string `json:"watching_dir" required:"true"` // *
WatchingDir string `json:"watching_dir"` // *

// > @3@4@5@6
// >
Expand Down
1 change: 1 addition & 0 deletions plugin/input/file/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func TestProvierWatcherPaths(t *testing.T) {
ctl.RegisterCounter("worker1", "help_test"),
ctl.RegisterCounter("worker2", "help_test"),
ctl.RegisterGauge("worker3", "help_test"),
ctl.RegisterGauge("worker4", "help_test"),
)
jp := NewJobProvider(config, metrics, &zap.SugaredLogger{})

Expand Down

0 comments on commit 5446e1f

Please sign in to comment.