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
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.8.2
    • 3.0
    • 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

          Build couchbase-lite-core-3.0.0-59 contains couchbase-lite-core commit 725ec4f with commit message:
          CBL-1660: Make sure all debug logging is not present in release (#1122)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-core-3.0.0-59 contains couchbase-lite-core commit 725ec4f with commit message: CBL-1660 : Make sure all debug logging is not present in release (#1122)

          Build couchbase-lite-cblite-3.0.0-60 contains couchbase-lite-core commit 725ec4f with commit message:
          CBL-1660: Make sure all debug logging is not present in release (#1122)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-cblite-3.0.0-60 contains couchbase-lite-core commit 725ec4f with commit message: CBL-1660 : Make sure all debug logging is not present in release (#1122)

          Build couchbase-lite-log-3.0.0-61 contains couchbase-lite-core commit 725ec4f with commit message:
          CBL-1660: Make sure all debug logging is not present in release (#1122)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-log-3.0.0-61 contains couchbase-lite-core commit 725ec4f with commit message: CBL-1660 : Make sure all debug logging is not present in release (#1122)

          Build couchbase-lite-ios-3.0.0-89 contains couchbase-lite-core commit 725ec4f with commit message:
          CBL-1660: Make sure all debug logging is not present in release (#1122)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-ios-3.0.0-89 contains couchbase-lite-core commit 725ec4f with commit message: CBL-1660 : Make sure all debug logging is not present in release (#1122)

          Build couchbase-lite-android-3.0.0-66 contains couchbase-lite-core commit 725ec4f with commit message:
          CBL-1660: Make sure all debug logging is not present in release (#1122)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-android-3.0.0-66 contains couchbase-lite-core commit 725ec4f with commit message: CBL-1660 : Make sure all debug logging is not present in release (#1122)

          Build couchbase-lite-java-3.0.0-66 contains couchbase-lite-core commit 725ec4f with commit message:
          CBL-1660: Make sure all debug logging is not present in release (#1122)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-java-3.0.0-66 contains couchbase-lite-core commit 725ec4f with commit message: CBL-1660 : Make sure all debug logging is not present in release (#1122)

          Build couchbase-lite-net-3.0.0-47 contains couchbase-lite-core commit 725ec4f with commit message:
          CBL-1660: Make sure all debug logging is not present in release (#1122)

          build-team Couchbase Build Team added a comment - Build couchbase-lite-net-3.0.0-47 contains couchbase-lite-core commit 725ec4f with commit message: CBL-1660 : Make sure all debug logging is not present in release (#1122)

          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