Skip to content

Commit

Permalink
chore: increase logs on access error
Browse files Browse the repository at this point in the history
Signed-off-by: Florentin Dubois <florentin.dubois@clever-cloud.com>
  • Loading branch information
FlorentinDUBOIS committed Oct 21, 2023
1 parent ea0b8af commit 887babe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/protocol/kawa_h1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1435,8 +1435,9 @@ impl<Front: SocketHandler, L: ListenerHandler + L7ListenerHandler> Http<Front, L
if self.backend_readiness.event.is_hup() && !self.test_backend_socket() {
//retry connecting the backend
error!(
"{} error connecting to backend, trying again",
self.log_context()
"{} error connecting to backend, trying again, attempt {}",
self.log_context(),
self.connection_attempts
);

self.connection_attempts += 1;
Expand Down
2 changes: 2 additions & 0 deletions lib/src/protocol/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ impl<Front: SocketHandler, L: ListenerHandler> Pipe<Front, L> {

pub fn log_request_error(&self, metrics: &SessionMetrics, message: &str) {
incr!("pipe.errors");
warn!("could not process request properly got: {}", message);
self.print_state(&self.log_context().to_string());
self.log_request(metrics, Some(message));
}

Expand Down

0 comments on commit 887babe

Please sign in to comment.