@@ -1638,10 +1638,12 @@ static int sqlcipher_profile_callback(unsigned int trace, void *file, void *stmt
16381638 FILE * f = (FILE * ) file ;
16391639 double elapsed = (* ((sqlite3_uint64 * )run_time ))/1000000.0 ;
16401640 if (f == NULL ) {
1641+ #if !defined(SQLCIPHER_OMIT_LOG_DEVICE )
16411642#if defined(__ANDROID__ )
16421643 __android_log_print (ANDROID_LOG_DEBUG , "sqlcipher" , SQLCIPHER_PROFILE_FMT , elapsed , sqlite3_sql ((sqlite3_stmt * )stmt ));
16431644#elif defined(__APPLE__ )
16441645 os_log (OS_LOG_DEFAULT , SQLCIPHER_PROFILE_FMT_OSLOG , elapsed , sqlite3_sql ((sqlite3_stmt * )stmt ));
1646+ #endif
16451647#endif
16461648 } else {
16471649 fprintf (f , SQLCIPHER_PROFILE_FMT , elapsed , sqlite3_sql ((sqlite3_stmt * )stmt ));
@@ -1695,16 +1697,17 @@ void sqlcipher_log(unsigned int level, const char *message, ...) {
16951697 char * formatted = NULL ;
16961698
16971699#ifdef CODEC_DEBUG
1700+ #if !defined(SQLCIPHER_OMIT_LOG_DEVICE )
16981701#if defined(__ANDROID__ )
16991702 __android_log_vprint (ANDROID_LOG_DEBUG , "sqlcipher" , message , params );
1700- #elif define (__APPLE__ )
1703+ #elif defined (__APPLE__ )
17011704 formatted = sqlite3_vmprintf (message , params );
17021705 os_log (OS_LOG_DEFAULT , "%s" , formatted );
17031706 sqlite3_free (formatted );
1704- #else
1707+ #endif
1708+ #endif
17051709 vfprintf (stderr , message , params );
17061710 fprintf (stderr , "\n" );
1707- #endif
17081711#endif
17091712
17101713 if (level > sqlcipher_log_level || (sqlcipher_log_device == 0 && sqlcipher_log_file == NULL )) {
@@ -1737,6 +1740,7 @@ void sqlcipher_log(unsigned int level, const char *message, ...) {
17371740 fprintf ((FILE * )sqlcipher_log_file , "\n" );
17381741 }
17391742 }
1743+ #if !defined(SQLCIPHER_OMIT_LOG_DEVICE )
17401744 if (sqlcipher_log_device ) {
17411745#if defined(__ANDROID__ )
17421746 __android_log_vprint (ANDROID_LOG_DEBUG , "sqlcipher" , message , params );
@@ -1746,6 +1750,8 @@ void sqlcipher_log(unsigned int level, const char *message, ...) {
17461750 sqlite3_free (formatted );
17471751#endif
17481752 }
1753+ #endif
1754+
17491755end :
17501756 va_end (params );
17511757}
0 commit comments