Skip to content

Commit

Permalink
Merge pull request #270 from netixx/netixx/add-starlark-logs
Browse files Browse the repository at this point in the history
Add logs on starlark failed processing with debug enabled
  • Loading branch information
karimra authored Oct 31, 2023
2 parents 49ba97c + 106e34e commit bd19bd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion formatters/event_starlark/event_starlark.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ func (p *starlarkProc) Apply(es ...*formatters.EventMsg) []*formatters.EventMsg
}
r, err := starlark.Call(p.thread, p.applyFn, sevs, nil)
if err != nil {
p.logger.Printf("failed to run script: %v", err)
if p.Debug {
p.logger.Printf("failed to run script with input %v: %v", sevs, err)
} else {
p.logger.Printf("failed to run script: %v", err)
}
return es
}
if p.Debug {
Expand Down

0 comments on commit bd19bd9

Please sign in to comment.