Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SubProtocolWebSocketHandler should not log ERROR on "No messages received after ..." [SPR-16409] #20955

Closed
spring-projects-issues opened this issue Jan 23, 2018 · 3 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jan 23, 2018

Stefan Norberg opened SPR-16409 and commented

SubProtocolWebSocketHandler log level seems off for:

logger.error("No messages received after " + timeSinceCreated + " ms. " +

I feel that this log message should be logged on INFO (or possibly WARN) rather than ERROR:

ERROR o.s.w.s.m.SubProtocolWebSocketHandler - No messages received after 102078 ms. Closing WebSocketServerSockJsSession[id=m5sjshh2]


Affects: 4.3.14, 5.0 GA

Reference URL:

logger.error("No messages received after " + timeSinceCreated + " ms. " +

Issue Links:

Referenced from: commits 8e2be91, 09cb7f4

Backported to: 4.3.15

@spring-projects-issues
Copy link
Collaborator Author

Stefan Norberg commented

Also, StandardWebSocketHandlerAdapter will log an error when client disconnects.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

I've fine-tuned our logging of WebSocket close exceptions in all applicable decorators, consistently logging close exceptions at WARN level instead of ERROR, and lowered the log level of the "No message" part to INFO (as you suggested).

@spring-projects-issues
Copy link
Collaborator Author

Stefan Norberg commented

Awesome. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants