Skip to content

Commit

Permalink
Log handler error at error level instead of info level (#5011)
Browse files Browse the repository at this point in the history
Signed-off-by: Francis Guimond <francis@sensu.io>
  • Loading branch information
fguimond authored May 17, 2023
1 parent cedb7a3 commit 1065c3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Versioning](http://semver.org/spec/v2.0.0.html).
- Added a session store, used to detect and prevent refresh token reuse

### Changed
- Log handler error at error level instead of info level
- Users are now automatically logged out after a period of inactivity (12h)

## [6.9.2] - 2023-03-08
Expand Down
6 changes: 5 additions & 1 deletion backend/pipeline/handler/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ func (l *LegacyAdapter) Handle(ctx context.Context, ref *corev2.ResourceReferenc
}
fields["status"] = result.Status
fields["output"] = result.Output
logger.WithFields(fields).Info("event pipe handler executed")
if result.Status == 0 {
logger.WithFields(fields).Info("event pipe handler executed")
} else {
logger.WithFields(fields).Error("event pipe handler returned non ok status code")
}
case "tcp", "udp":
err := l.socketHandler(ctx, handler, event, mutatedData)
if err != nil {
Expand Down

0 comments on commit 1065c3d

Please sign in to comment.