Skip to content

Commit 1e45459

Browse files
committed
Add session id to logs for no active session
1 parent 9fe3b79 commit 1e45459

File tree

1 file changed

+3
-3
lines changed
  • ocpp-common/src/main/java/eu/chargetime/ocpp

1 file changed

+3
-3
lines changed

ocpp-common/src/main/java/eu/chargetime/ocpp/Server.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ public Confirmation handleRequest(Request request)
117117
.handleRequest(sessionIdOptional.get(), request);
118118
} else {
119119
logger.error(
120-
"Unable to handle request ({}), the active session was not found.",
121-
request);
120+
"Unable to handle request ({}), the active session was not found for {}.",
121+
request, session.getSessionId());
122122
throw new IllegalStateException("Active session not found");
123123
}
124124
} else {
@@ -154,7 +154,7 @@ public void handleConnectionClosed() {
154154
serverEvents.lostSession(sessionIdOptional.get());
155155
sessions.remove(sessionIdOptional.get());
156156
} else {
157-
logger.warn("Active session not found");
157+
logger.warn("Active session not found for {}", session.getSessionId());
158158
}
159159
}
160160

0 commit comments

Comments
 (0)