I love the mongoc tracing, its a godsend.
During development of the PHP driver I always compile mongoc with -DMONGOC_TRACE and then at runtime in my log handler I check if I should print these things to stderr, file, or ignore it.
I am planning on shipping the driver with tracing enabled as I want to be able to get full debugging logs with a flip of a userland-switch (e.g. no need for the user to recompile anything or jump through hoops).
This works fine for all the other log events without any clear performance penalty (-ish, vargs and strdupv_printf()s...) – but in the tracing case, DUMP_BYTES() & DUMP_IOVEC() are painful.
It would be fantastic if we could short circuit the DUMP_*() madness, and out of mongoc_log() based on a "config setting".
- is related to
-
PHPC-256 Production debug logs
- Closed
- related to
-
CDRIVER-697 Turn on basic err checking in release build
- Closed