Not all debug logging is compiled out of release builds

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.

Activity

Show:

CB robot April 21, 2021 at 9:16 PM

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

CB robot March 24, 2021 at 12:44 AM

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

CB robot March 24, 2021 at 12:35 AM

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

CB robot March 3, 2021 at 1:01 AM

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

CB robot February 25, 2021 at 10:49 PM

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

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Story Points

Components

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created February 9, 2021 at 11:53 PM
Updated May 24, 2021 at 5:48 PM
Resolved May 24, 2021 at 5:48 PM
Instabug