Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-1660

Not all debug logging is compiled out of release builds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.0
    • 2.8.2
    • LiteCore
    • Security Level: Public
    • Jim 41
    • 2

    Description

      Was investigating a CBSE and noticed that the logs contain some debug-level messages (even though this is a release build) but not others.

      The problem is that Logging.hh is not disabling enough debug-level logging macros in release builds. The block at line 195 commenting "// Debug(...) is stripped out of release builds" disables `Debug(...)`, which is an obsolete name. It should be disabling `LogDebug(...)` and `WriteDebug(...)`.

      The Poller.cc file also calls `LogToAt(WSLog, Debug, ...)` which is not compiled away.

      Note that these calls still won't log anything unless the appropriate log level is cranked all the way up to Debug. It's just that they still generate code.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jimb Jim Borden
            jens Jens Alfke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty