removed old debug code
This commit is contained in:
@@ -102,54 +102,4 @@ extern "C" {
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // _SDK_DEBUG_H_
|
||||
|
||||
|
||||
/*
|
||||
void dwr(int level, const char *fmt, ... )
|
||||
{
|
||||
#if defined(SDK_DEBUG)
|
||||
if(level > DEBUG_LEVEL)
|
||||
return;
|
||||
int saveerr;
|
||||
saveerr = errno;
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
char timestring[20];
|
||||
time_t timestamp;
|
||||
timestamp = time(NULL);
|
||||
strftime(timestring, sizeof(timestring), "%H:%M:%S", localtime(×tamp));
|
||||
#if defined(__ANDROID__)
|
||||
pid_t tid = gettid();
|
||||
#elif defined(__linux__)
|
||||
pid_t tid = 5;//syscall(SYS_gettid);
|
||||
#elif defined(__APPLE__)
|
||||
pid_t tid = pthread_mach_thread_np(pthread_self());
|
||||
#endif
|
||||
#if defined(SDK_DEBUG_LOG_TO_FILE)
|
||||
if(!debug_logfile) { // Try to get logfile from env
|
||||
debug_logfile = getenv("ZT_SDK_LOGFILE");
|
||||
}
|
||||
if(debug_logfile) {
|
||||
FILE *file = fopen(debug_logfile,"a");
|
||||
fprintf(file, "%s [tid=%7d] ", timestring, tid);
|
||||
vfprintf(file, fmt, ap);
|
||||
fclose(file);
|
||||
va_end(ap);
|
||||
}
|
||||
#endif
|
||||
va_start(ap, fmt);
|
||||
fprintf(stderr, "%s [tid=%7d] ", timestring, tid);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
|
||||
// Outputs to Android debug console
|
||||
#if defined(__ANDROID__)
|
||||
__android_log_vprint(ANDROID_LOG_VERBOSE, "ZT-JNI", fmt, ap);
|
||||
#endif
|
||||
|
||||
fflush(stderr);
|
||||
errno = saveerr;
|
||||
va_end(ap);
|
||||
#endif // _SDK_DEBUG
|
||||
}
|
||||
*/
|
||||
#endif // _SDK_DEBUG_H_
|
||||
Reference in New Issue
Block a user