Runtime flag for TRACE

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.2-beta0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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".

            Assignee:
            Hannes Magnusson (Inactive)
            Reporter:
            Hannes Magnusson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: