mirror of
https://github.com/wneessen/logranger.git
synced 2024-11-22 12:50:50 +01:00
Add error skip logic to action configuration
Updated the action configuration process in server.go to skip an action if its configuration results in an error. This ensures that the remaining actions can still execute, even if one fails during the configuration stage. File action plugin specifically has been updated to support this skip on error logic.
This commit is contained in:
parent
670e5b1d30
commit
9089cd80ca
1 changed files with 1 additions and 0 deletions
|
@ -192,6 +192,7 @@ func (s *Server) processMessage(lm parsesyslog.LogMsg) error {
|
||||||
if err := a.Config(r.Actions); err != nil {
|
if err := a.Config(r.Actions); err != nil {
|
||||||
s.log.Error("failed to config action", LogErrKey, err,
|
s.log.Error("failed to config action", LogErrKey, err,
|
||||||
slog.String("action", n), slog.String("rule_id", r.ID))
|
slog.String("action", n), slog.String("rule_id", r.ID))
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
if err := a.Process(lm, mg); err != nil {
|
if err := a.Process(lm, mg); err != nil {
|
||||||
s.log.Error("failed to process action", LogErrKey, err,
|
s.log.Error("failed to process action", LogErrKey, err,
|
||||||
|
|
Loading…
Reference in a new issue