mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
added code to log all errors to logcat when on android.
This commit is contained in:
parent
70a0f9e4a1
commit
e14793486d
7
dna.c
7
dna.c
@ -84,6 +84,10 @@ int dumpResponses(struct response_set *responses)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
int setReason(char *fmt, ...)
|
||||
{
|
||||
va_list ap,ap2;
|
||||
@ -96,6 +100,9 @@ int setReason(char *fmt, ...)
|
||||
|
||||
va_end(ap);
|
||||
|
||||
#ifdef ANDROID
|
||||
__android_log_print(ANDROID_LOG_DEBUG, "servald", "%s",msg);
|
||||
#endif
|
||||
fprintf(stderr,"Error: %s\n",msg);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user