Skip to content

Commit

Permalink
Improve logs
Browse files Browse the repository at this point in the history
  • Loading branch information
arunans23 committed Jun 2, 2023
1 parent 10e2eb5 commit d9548f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ public void timeout(NHttpServerConnection conn) {
"STATE_DESCRIPTION = Socket Timeout occurred after accepting the request headers and the request "
+ "body, INTERNAL_STATE = "
+ state + ", DIRECTION = " + logDetails.get("direction") + ", "
+ "CAUSE_OF_ERROR = Connection between the client and the EI timeouts, HTTP_URL = "
+ "CAUSE_OF_ERROR = Connection between the client and the WSO2 server timeouts, HTTP_URL = "
+ logDetails.get("url") + ", " + "HTTP_METHOD = " + logDetails.get("method")
+ ", SOCKET_TIMEOUT = " + conn.getSocketTimeout() + ", CLIENT_ADDRESS = "
+ getClientConnectionInfo(conn)
Expand Down Expand Up @@ -649,7 +649,7 @@ public void closed(NHttpServerConnection conn) {
log.warn("STATE_DESCRIPTION = Connection closed while server accepting request headers but prior to "
+ "finish reading the request body, INTERNAL_STATE = " + state + ", DIRECTION = " + logDetails
.get("direction") + ", "
+ "CAUSE_OF_ERROR = Connection between EI and the Client has been closed, HTTP_URL = " + logDetails
+ "CAUSE_OF_ERROR = Connection between WSO2 Server and the Client has been closed, HTTP_URL = " + logDetails
.get("url") + ", " + "HTTP_METHOD = " + logDetails.get("method") + ", CLIENT_ADDRESS = "
+ getClientConnectionInfo(conn)
+ ", CORRELATION_ID = " + conn.getContext().getAttribute(CorrelationConstants.CORRELATION_ID)
Expand All @@ -663,7 +663,7 @@ public void closed(NHttpServerConnection conn) {
informWriterError(conn);
log.warn("STATE_DESCRIPTION = Connection closed while server writing the response headers or body, "
+ "INTERNAL_STATE = " + state + ", DIRECTION = " + logDetails.get("direction") + ", "
+ "CAUSE_OF_ERROR = Connection between EI and the Client has been closed, HTTP_URL = " + logDetails
+ "CAUSE_OF_ERROR = Connection between WSO2 Server and the Client has been closed, HTTP_URL = " + logDetails
.get("url") + ", " + "HTTP_METHOD = " + logDetails.get("method") + ", CLIENT_ADDRESS = "
+ getClientConnectionInfo(conn)
+ ", CORRELATION_ID = " + conn.getContext().getAttribute(CorrelationConstants.CORRELATION_ID)
Expand All @@ -676,7 +676,7 @@ public void closed(NHttpServerConnection conn) {
informWriterError(conn);
log.warn("STATE_DESCRIPTION = Connection closed after server accepting the request headers and the "
+ "request body, INTERNAL_STATE = " + state + ", DIRECTION = " + logDetails.get("direction") + ", "
+ "CAUSE_OF_ERROR = Connection between EI and the Client has been closed, HTTP_URL = " + logDetails
+ "CAUSE_OF_ERROR = Connection between WSO2 Server and the Client has been closed, HTTP_URL = " + logDetails
.get("url") + ", " + "HTTP_METHOD = " + logDetails.get("method") + ", CLIENT_ADDRESS = "
+ getClientConnectionInfo(conn)
+ ", CORRELATION_ID = " + conn.getContext().getAttribute(CorrelationConstants.CORRELATION_ID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ public void timeout(NHttpClientConnection conn) {
log.warn("ERROR_CODE = " + ErrorCodes.CONNECTION_TIMEOUT + ", STATE_DESCRIPTION = Socket Timeout "
+ "occurred " + logDetails.get("state_description") + ", INTERNAL_STATE = " + state
+ ", DIRECTION = " + logDetails.get("direction") + ", "
+ "CAUSE_OF_ERROR = Connection between the EI and the BackEnd timeouts, TARGET_HOST = "
+ "CAUSE_OF_ERROR = Connection between the WSO2 Server and the BackEnd timeouts, TARGET_HOST = "
+ logDetails.get("host") + ", TARGET_PORT = " + logDetails.get("port") + ", TARGET_CONTEXT = "
+ logDetails.get("url") + ", " + "HTTP_METHOD = " + logDetails.get("method")
+ ", TRIGGER_TYPE = " + logDetails.get("trigger_type") + ", TRIGGER_NAME = " + logDetails
Expand All @@ -790,7 +790,7 @@ public void timeout(NHttpClientConnection conn) {
log.warn("ERROR_CODE = " + ErrorCodes.CONNECTION_TIMEOUT + ", STATE_DESCRIPTION = Socket Timeout "
+ "occurred " + logDetails.get("state_description") + ", INTERNAL_STATE = " + state
+ ", DIRECTION = " + logDetails.get("direction") + ", "
+ "CAUSE_OF_ERROR = Connection between the EI and the BackEnd timeouts, TARGET_HOST = "
+ "CAUSE_OF_ERROR = Connection between the WSO2 Server and the BackEnd timeouts, TARGET_HOST = "
+ logDetails.get("host") + ", TARGET_PORT = " + logDetails.get("port") + ", TARGET_CONTEXT = "
+ logDetails.get("url") + ", " + "HTTP_METHOD = " + logDetails.get("method")
+ ", TRIGGER_TYPE = " + logDetails.get("trigger_type") + ", TRIGGER_NAME = " + logDetails
Expand All @@ -803,7 +803,7 @@ public void timeout(NHttpClientConnection conn) {
log.warn("ERROR_CODE = " + ErrorCodes.CONNECTION_TIMEOUT + ", STATE_DESCRIPTION = Socket Timeout "
+ "occurred " + logDetails.get("state_description") + ", INTERNAL_STATE = " + state
+ ", DIRECTION = " + logDetails.get("direction") + ", "
+ "CAUSE_OF_ERROR = Connection between the EI and the BackEnd timeouts, TARGET_HOST = "
+ "CAUSE_OF_ERROR = Connection between the WSO2 Server and the BackEnd timeouts, TARGET_HOST = "
+ logDetails.get("host") + ", TARGET_PORT = " + logDetails.get("port") + ", TARGET_CONTEXT = "
+ logDetails.get("url") + ", " + "HTTP_METHOD = " + logDetails.get("method")
+ ", TRIGGER_TYPE = " + logDetails.get("trigger_type") + ", TRIGGER_NAME = " + logDetails
Expand Down

0 comments on commit d9548f2

Please sign in to comment.