[JAVA-785] Improve logging of socket errors Created: 11/Mar/13  Updated: 19/Mar/13  Resolved: 12/Mar/13

Status: Closed
Project: Java Driver
Component/s: Monitoring
Affects Version/s: None
Fix Version/s: 2.11.0

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change

 Description   

A number of improvements to log messages around socket errors:

1. When autoConnectRetry is true, change retry message from severe to warning and text to:

   _logger.log(Level.WARNING, "Exception connecting to " +
               serverAddress().getHost() + ": " + e +
               ".  Total wait time so far is " + waitSoFar + 
               " ms.  Will retry after sleeping for " + sleepTime + " ms.");

2. Change "can't say something" error message to:

"Write operation to server " + port.host() + " failed ..."

3. Change "can't call something" error message to:

"Read operation to server " + port.host() + " failed ..."



 Comments   
Comment by auto [ 12/Mar/13 ]

Author:

{u'date': u'2013-03-11T20:19:43Z', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-785: Improve logging for socket connect, read, and write. As part of this "can't say/call something is gone for good and replaced with something more understandable.
Also fixed the retry log message to properly report elapsed time, and changed it from severe to warning. As part of this, restructured the code to make it more intelligible.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/76983d0b3dafaae222c89b2ceab3bf56221f7cac

Comment by Jeffrey Yemin [ 11/Mar/13 ]

This could have an effect on applications that are relying on the specific text of the exception messages.

Generated at Thu Feb 08 08:53:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.