mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
make message better
This commit is contained in:
parent
c03235ed64
commit
1abdfc9b10
14 changed files with 265 additions and 97 deletions
|
@ -12,9 +12,10 @@ type UnixParser struct {
|
|||
}
|
||||
|
||||
type UnixParserCtx struct {
|
||||
Grok grokky.Host
|
||||
Stages []string
|
||||
Profiling bool
|
||||
Grok grokky.Host
|
||||
Stages []string
|
||||
Profiling bool
|
||||
DataFolder string
|
||||
}
|
||||
|
||||
func (u UnixParser) IsParsable(ctx interface{}, l types.Line) (bool, error) {
|
||||
|
@ -28,6 +29,7 @@ func (u UnixParser) Init(c map[string]interface{}) (*UnixParserCtx, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
r.DataFolder = c["data"].(string)
|
||||
for _, f := range files {
|
||||
log.Debugf("Loading %s", f.Name())
|
||||
if err := r.Grok.AddFromFile(c["patterns"].(string) + f.Name()); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue