Auto-rediscover new glob patterns

This commit is contained in:
2026-03-23 20:39:12 +01:00
parent d3160c7dd4
commit b89caa594c
3 changed files with 89 additions and 28 deletions

View File

@@ -28,7 +28,7 @@ func TestMultiTailerReadsLines(t *testing.T) {
defer f.Close()
ch := make(chan LogRecord, 100)
mt := NewMultiTailer([]string{path}, 24, 48, ch)
mt := NewMultiTailer([]string{path}, time.Hour, 24, 48, ch)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -67,7 +67,7 @@ func TestMultiTailerMultipleFiles(t *testing.T) {
}
ch := make(chan LogRecord, 200)
mt := NewMultiTailer(paths, 24, 48, ch)
mt := NewMultiTailer(paths, time.Hour, 24, 48, ch)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go mt.Run(ctx)
@@ -95,7 +95,7 @@ func TestMultiTailerLogRotation(t *testing.T) {
}
ch := make(chan LogRecord, 100)
mt := NewMultiTailer([]string{path}, 24, 48, ch)
mt := NewMultiTailer([]string{path}, time.Hour, 24, 48, ch)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go mt.Run(ctx)