Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-620

Runtime flag for TRACE

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2-beta0
    • Affects Version/s: None
    • Component/s: libmongoc
    • 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:
            bjori Hannes Magnusson
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: