Skip to content

Commit

Permalink
Merge pull request #218 from jmluy/logs-no-session
Browse files Browse the repository at this point in the history
Add session id to logs for no active session
  • Loading branch information
TVolden authored Oct 20, 2022
2 parents 9fe3b79 + 1e45459 commit b163057
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ocpp-common/src/main/java/eu/chargetime/ocpp/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public Confirmation handleRequest(Request request)
.handleRequest(sessionIdOptional.get(), request);
} else {
logger.error(
"Unable to handle request ({}), the active session was not found.",
request);
"Unable to handle request ({}), the active session was not found for {}.",
request, session.getSessionId());
throw new IllegalStateException("Active session not found");
}
} else {
Expand Down Expand Up @@ -154,7 +154,7 @@ public void handleConnectionClosed() {
serverEvents.lostSession(sessionIdOptional.get());
sessions.remove(sessionIdOptional.get());
} else {
logger.warn("Active session not found");
logger.warn("Active session not found for {}", session.getSessionId());
}
}

Expand Down

0 comments on commit b163057

Please sign in to comment.