diff --git a/src/libpgagroal/message.c b/src/libpgagroal/message.c index abfa8526..41065a7c 100644 --- a/src/libpgagroal/message.c +++ b/src/libpgagroal/message.c @@ -995,9 +995,8 @@ pgagroal_log_message(struct message* msg) } else { - ZF_LOGI("Size: %zd", msg->length); ZF_LOGI_MEM(msg->data, msg->length, - "Message %p:", (const void *)msg->data); + "Message (%zd) %p:", msg->length, (const void *)msg->data); } } diff --git a/src/libpgagroal/pipeline_perf.c b/src/libpgagroal/pipeline_perf.c index aa966d88..4ff84c05 100644 --- a/src/libpgagroal/pipeline_perf.c +++ b/src/libpgagroal/pipeline_perf.c @@ -125,6 +125,7 @@ performance_client(struct ev_loop *loop, struct ev_io *watcher, int revents) client_error: ZF_LOGW("[C] Client error: %s (socket %d status %d)", strerror(errno), wi->client_fd, status); + pgagroal_log_message(msg); errno = 0; exit_code = WORKER_CLIENT_FAILURE; @@ -134,6 +135,7 @@ performance_client(struct ev_loop *loop, struct ev_io *watcher, int revents) server_error: ZF_LOGW("[C] Server error: %s (socket %d status %d)", strerror(errno), wi->server_fd, status); + pgagroal_log_message(msg); errno = 0; exit_code = WORKER_SERVER_FAILURE; @@ -185,6 +187,7 @@ performance_server(struct ev_loop *loop, struct ev_io *watcher, int revents) client_error: ZF_LOGW("[S] Client error: %s (socket %d status %d)", strerror(errno), wi->client_fd, status); + pgagroal_log_message(msg); errno = 0; exit_code = WORKER_CLIENT_FAILURE; @@ -194,6 +197,7 @@ performance_server(struct ev_loop *loop, struct ev_io *watcher, int revents) server_error: ZF_LOGW("[S] Server error: %s (socket %d status %d)", strerror(errno), wi->server_fd, status); + pgagroal_log_message(msg); errno = 0; exit_code = WORKER_SERVER_FAILURE; diff --git a/src/libpgagroal/pipeline_session.c b/src/libpgagroal/pipeline_session.c index 07b639f6..f7aaf06f 100644 --- a/src/libpgagroal/pipeline_session.c +++ b/src/libpgagroal/pipeline_session.c @@ -251,6 +251,7 @@ session_client(struct ev_loop *loop, struct ev_io *watcher, int revents) client_error: ZF_LOGW("[C] Client error: %s (socket %d status %d)", strerror(errno), wi->client_fd, status); + pgagroal_log_message(msg); errno = 0; client_inactive(wi->slot, wi->pipeline_shmem); @@ -262,6 +263,7 @@ session_client(struct ev_loop *loop, struct ev_io *watcher, int revents) server_error: ZF_LOGW("[C] Server error: %s (socket %d status %d)", strerror(errno), wi->server_fd, status); + pgagroal_log_message(msg); errno = 0; client_inactive(wi->slot, wi->pipeline_shmem); @@ -335,6 +337,7 @@ session_server(struct ev_loop *loop, struct ev_io *watcher, int revents) client_error: ZF_LOGW("[S] Client error: %s (socket %d status %d)", strerror(errno), wi->client_fd, status); + pgagroal_log_message(msg); errno = 0; client_inactive(wi->slot, wi->pipeline_shmem); @@ -346,6 +349,7 @@ session_server(struct ev_loop *loop, struct ev_io *watcher, int revents) server_error: ZF_LOGW("[S] Server error: %s (socket %d status %d)", strerror(errno), wi->server_fd, status); + pgagroal_log_message(msg); errno = 0; client_inactive(wi->slot, wi->pipeline_shmem);