Use android log system on Sequoia Tracing sync
authorHussein Kasem <huss@pep-project.org>
Wed, 15 May 2019 14:04:47 +0200
branchsync
changeset 36844b60d8ec04e5
parent 3683 c6914bf63ee4
child 3686 7dbf0a0f6163
Use android log system on Sequoia Tracing
src/pgp_sequoia.c
     1.1 --- a/src/pgp_sequoia.c	Wed May 15 14:03:15 2019 +0200
     1.2 +++ b/src/pgp_sequoia.c	Wed May 15 14:04:47 2019 +0200
     1.3 @@ -27,9 +27,17 @@
     1.4  // enable tracing if in debugging mode
     1.5  #if TRACING
     1.6  #include "status_to_string.h"
     1.7 +
     1.8 +#ifdef ANDROID
     1.9 +#  include <android/log.h>
    1.10 +#  define _T(...) do {                          \
    1.11 +        __android_log_print(ANDROID_LOG_DEBUG, "pEpEngine-sequoia", __VA_ARGS__);         \
    1.12 +    } while (0)
    1.13 +#else
    1.14  #  define _T(...) do {                          \
    1.15          fprintf(stderr, ##__VA_ARGS__);         \
    1.16      } while (0)
    1.17 +#endif
    1.18  #else
    1.19  #  define _T(...) do { } while (0)
    1.20  #endif