[CDRIVER-1504] Provide a way to suppress mongoc warning message for counters Created: 30/Aug/16 Updated: 20/Sep/16 Resolved: 20/Sep/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.3.3 |
| Fix Version/s: | 1.4.1, 1.5.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Tanmoy Palit | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Red Hat Linux |
||
| Description |
|
We need to suppress the following warning message from going out to stdout Currently we are disabling mongo-c performance counters by default (by setting MONGOC_DISABLE_SHM) but because of that users are seeing the warning message on the console and we would like to suppress that. It will fine even if the fix is available in later version of the Mongo C Driver. |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 20/Sep/16 ] |
|
Cherry-picked to r1.4 branch: https://github.com/mongodb/mongo-c-driver/commit/8c6ae3f1de36953a36e6c599d467b0300e6e7982 |
| Comment by Githook User [ 20/Sep/16 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: |
| Comment by Githook User [ 31/Aug/16 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: |
| Comment by Tanmoy Palit [ 30/Aug/16 ] |
|
Thanks. |
| Comment by Hannes Magnusson [ 30/Aug/16 ] |
|
Yes, --disable-shm-counters will not compile them in at all, so the codepath is much simplified then disabling them at runtime, which erroneously winds up printing that warning. Out of curiosity, why are you disabling them? They shouldn't have any affect on the use of the driver, so I'm curious why you'd disable them |
| Comment by Tanmoy Palit [ 30/Aug/16 ] |
|
Just to clarify, so I can build 1.3.3 driver with --disable-shm-counters options to disable the message. I don't need latest driver version right? |
| Comment by Hannes Magnusson [ 30/Aug/16 ] |
|
If you have no need for them, you can configure the driver with --disable-shm-counters. That warning isn't particularly useful, we should probably remove it |