Changeset 1943
- Timestamp:
- Sep 23, 2012, 5:35:20 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/log.cpp
r1695 r1943 22 22 #if defined __ANDROID__ 23 23 # include <android/log.h> 24 # include <unistd.h> /* for gettid() */ 24 25 #else 25 26 # include <cstdarg> … … 74 75 { 75 76 #if defined __ANDROID__ 76 int prio[] =77 int const prio[] = 77 78 { 78 79 ANDROID_LOG_DEBUG, … … 82 83 }; 83 84 84 //__android_log_print(prio[type], "LOL", "thread %ld", pthread_self()); 85 __android_log_vprint(prio[type], "LOL", fmt, ap); 85 char buf[4096]; 86 vsnprintf(buf, 4095, fmt, ap); 87 buf[4095] = '\0'; 88 89 __android_log_print(prio[type], "LOL", "[%d] %s", (int)gettid(), buf); 86 90 87 91 #else
Note: See TracChangeset
for help on using the changeset viewer.