Skip to content

Conversation

@razvanphp
Copy link
Contributor

This helps as well to display the reason on libs that link logging based on Events only.

https://github.com/matth-x/MicroOcpp/blob/0455ec05aabdb3475cbd2dedee430acc51b155c7/src/MicroOcpp/Core/Connection.cpp#L71-L75

@razvanphp
Copy link
Contributor Author

Logs in MicroOcpp look like this now:

[19:03:37][OCPP] [MO] info (Connection.cpp:75):
[19:03:37][OCPP] Disconnected: Connection lost
[...]
[19:03:45][OCPP] [MO] info (Connection.cpp:75):
[19:03:45][OCPP] Disconnected: TCP connection cleanup
[...]
[02:00:13][OCPP] [MO] info (Connection.cpp:75):
[02:00:13][OCPP] Disconnected: WebSocket handshake failed - HTTP 401
[02:00:19][OCPP] [MO] info (Connection.cpp:75):
[02:00:19][OCPP] Disconnected: WebSocket handshake failed - HTTP 401

Before, one could not see / understand what the problem is.

@Links2004 Links2004 merged commit 84f3794 into Links2004:master Oct 24, 2025
43 checks passed
@razvanphp razvanphp deleted the add-disconnect-reason branch October 24, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants