Browse Source

add log for android to be able to see what is happening while syncing on "realtime"

doc_update_sequoia
Hussein Kasem 5 years ago
parent
commit
8201594073
2 changed files with 13 additions and 0 deletions
  1. +6
    -0
      src/pEpEngine.c
  2. +7
    -0
      src/pEp_internal.h

+ 6
- 0
src/pEpEngine.c View File

@ -768,6 +768,12 @@ DYNAMIC_API PEP_STATUS log_event(
assert(title);
assert(entity);
#ifndef NDEBUG
#ifdef ANDROID
LOGD(" %s :: %s :: %s ", title, entity, description);
#endif
#endif
if (!(session && title && entity))
return PEP_ILLEGAL_VALUE;


+ 7
- 0
src/pEp_internal.h View File

@ -166,9 +166,16 @@ void release_transport_system(PEP_SESSION session, bool out_last);
#ifdef NDEBUG
#define DEBUG_LOG(TITLE, ENTITY, DESC)
#define LOGD(...)
#else
#define DEBUG_LOG(TITLE, ENTITY, DESC) \
log_event(session, (TITLE), (ENTITY), (DESC), "debug");
#ifdef ANDROID
#include <android/log.h>
#define LOG_TAG "pEpEngine"
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#endif
#endif
// Space tolerant and case insensitive fingerprint string compare


Loading…
Cancel
Save