do not spew.Sdump() the invalid node on error. It leads to huge memory usage, especially if the parsers refers ie. datafile (#1550)
This commit is contained in:
parent
5009e9e483
commit
0483b9c641
1 changed files with 3 additions and 2 deletions
|
@ -545,12 +545,13 @@ func (n *Node) compile(pctx *UnixParserCtx, ectx EnricherCtx) error {
|
|||
|
||||
if !valid {
|
||||
/* node is empty, error force return */
|
||||
n.Logger.Infof("Node is empty: %s", spew.Sdump(n))
|
||||
n.Logger.Error("Node is empty or invalid, abort")
|
||||
n.Stage = ""
|
||||
return fmt.Errorf("Node is empty")
|
||||
}
|
||||
|
||||
if err := n.validate(pctx, ectx); err != nil {
|
||||
return err
|
||||
//n.logger.Fatalf("Node is invalid : %s", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue