Tail unit tests and README tweaks

This commit is contained in:
Cameron Sparr
2016-04-26 10:43:41 -06:00
parent c7719ac365
commit 44c945b9f5
3 changed files with 129 additions and 8 deletions

View File

@@ -25,6 +25,12 @@ type Tail struct {
sync.Mutex
}
func NewTail() *Tail {
return &Tail{
FromBeginning: false,
}
}
const sampleConfig = `
## files to tail.
## These accept standard unix glob matching rules, but with the addition of
@@ -145,8 +151,6 @@ func (t *Tail) SetParser(parser parsers.Parser) {
func init() {
inputs.Add("tail", func() telegraf.Input {
return &Tail{
FromBeginning: false,
}
return NewTail()
})
}