Browse Source

Add Android log.

As on android NDK stdout is redirected to /dev/null, we need to use the
__android_log_print method to print the logs.
ENGINE-703
Hussein Kasem 2 years ago
parent
commit
e2da6f38e8
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/pEpEngine.c

+ 5
- 0
src/pEpEngine.c View File

@ -2317,6 +2317,11 @@ DYNAMIC_API PEP_STATUS log_event(
log_output_debug(title, entity, description, comment);
#endif
#if defined(ANDROID) && !defined(NDEBUG)
__android_log_print(ANDROID_LOG_DEBUG, "pEpEngine", " %s :: %s :: %s :: %s ",
title, entity, description, comment);
#endif
// N.B. If testing (so NDEBUG not defined) but this message is spam,
// put -D_PEP_SERVICE_LOG_OFF into CFLAGS/CXXFLAGS
#if !defined(NDEBUG) && !defined(_PEP_SERVICE_LOG_OFF)


Loading…
Cancel
Save