Skip to content

Commit 007a3f7

Browse files
Disable ALOGD/ALOGI when LOG_NDEBUG/NDEBUG defined
1 parent 1bea27c commit 007a3f7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sqlcipher/src/main/jni/sqlcipher/ALog-priv.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
/*
17-
** Modified to support SQLite extensions by the SQLite developers:
17+
** Modified to support SQLite extensions by the SQLite developers:
1818
1919
*/
2020

@@ -52,12 +52,20 @@
5252
#endif
5353

5454
#ifndef ALOGD
55+
#if LOG_NDEBUG
56+
#define ALOGD(...) ((void)0)
57+
#else
5558
#define ALOGD(...) ((void)ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__))
5659
#endif
60+
#endif
5761

5862
#ifndef ALOGI
63+
#if LOG_NDEBUG
64+
#define ALOGI(...) ((void)0)
65+
#else
5966
#define ALOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
6067
#endif
68+
#endif
6169

6270
#ifndef ALOGW
6371
#define ALOGW(...) ((void)ALOG(LOG_WARN, LOG_TAG, __VA_ARGS__))

0 commit comments

Comments
 (0)