[CXX-85] C++ driver DBClientReplicaSet pollutes stdout with logging information Created: 22/Apr/11 Updated: 04/May/14 Resolved: 22/Apr/14 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | legacy-0.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Leon Mergen | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 2 |
| Labels: | cxxmove, legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
The C++ driver's DBClientReplicaSet seems to pollute our stdout with logging information: Fri Apr 22 16:02:25 updated set (tsukku) to: tsukku/localhost:27017,dev.tsukku.eu:27017 I assume it's due to a misconfiguration in the logging commands, since these shouldn't be emitted to stdout. |
| Comments |
| Comment by Githook User [ 22/Apr/14 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Githook User [ 22/Apr/14 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Andrew Morrow (Inactive) [ 22/Apr/14 ] |
| Comment by Troy Heron [ 21/May/13 ] |
|
I'm now using this ugly work-around for this problem: FILE* nullLog = fopen("/dev/null", "w"); |
| Comment by Troy Heron [ 18/May/13 ] |
|
I agree with this for sure. It makes it pretty much impossible to provide any level of polish to an application using mongodb and replica sets that also uses stdout itself. It should be possible to make the driver not do any output at all to stdout or stderr. |
| Comment by Leon Mergen [ 22/Apr/11 ] |
|
Yeah I'm using connection pooling, and there are very little extra messages. But, for example, when running our automated tests, we constantly see these log messages because lots of connections get created / dropped, making the real output unreadable. In the end it's not a major issue, it's an inconvenience; however, I do think it's inappropriate for a database driver to show this behaviour (by default). |
| Comment by Eliot Horowitz (Inactive) [ 22/Apr/11 ] |
|
Are you using connection pooling? |
| Comment by Leon Mergen [ 22/Apr/11 ] |
|
I'm seeing it every time a new connection is established indeed. Making it configurable would be a good idea, but I generally think that it's kind of weird for a database driver to pollute the stdout. |
| Comment by Eliot Horowitz (Inactive) [ 22/Apr/11 ] |
|
not really misconfiguration, its how we want it for our use cases. |