Merge pull request #2786 from cconlon/android-debug

add Android debug for logcat
pull/2801/head
toddouska 2020-02-13 10:12:40 -08:00 committed by GitHub
commit cabe30828c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -218,6 +218,8 @@ void WOLFSSL_TIME(int count)
#elif defined(WOLFSSL_TELIT_M2MB)
#include <stdio.h>
#include "m2m_log.h"
#elif defined(WOLFSSL_ANDROID_DEBUG)
#include <android/log.h>
#else
#include <stdio.h> /* for default printf stuff */
#endif
@ -260,6 +262,8 @@ static void wolfssl_log(const int logLevel, const char *const logMessage)
printk("%s\n", logMessage);
#elif defined(WOLFSSL_TELIT_M2MB)
M2M_LOG_INFO("%s\n", logMessage);
#elif defined(WOLFSSL_ANDROID_DEBUG)
__android_log_print(ANDROID_LOG_VERBOSE, "[wolfSSL]", "%s", logMessage);
#else
fprintf(stderr, "%s\n", logMessage);
#endif