1 //******************************************************************
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
10 * Created on: Mar 27, 2014
13 #include "SimpleLogger.h"
16 #include <android/log.h>
22 void LOG(const char * format, ...) {
25 va_start (args, format);
26 __android_log_vprint(ANDROID_LOG_INFO, "CCF-Lite-ANDROID", format, args);
28 #elif defined __linux__
29 printf("INFO: CCF-Lite-LINUX: ");
31 va_start (args, format);
32 vprintf(format, args);
38 void logDebug(const char * tag, const char * format, ...) {
41 va_start (args, format);
42 __android_log_vprint(ANDROID_LOG_DEBUG, tag, format, args);
44 #elif defined __linux__
45 printf("DEBUG: %s: ", tag);
47 va_start (args, format);
48 vprintf(format, args);
53 void logInfo(const char * tag, const char * format, ...) {
56 va_start (args, format);
57 __android_log_vprint(ANDROID_LOG_INFO, tag, format, args);
59 #elif defined __linux__
60 printf("INFO: %s: ", tag);
62 va_start (args, format);
63 vprintf(format, args);
69 void logWarn(const char * tag, const char * format, ...) {
72 va_start (args, format);
73 __android_log_vprint(ANDROID_LOG_WARN, tag, format, args);
75 #elif defined __linux__
76 printf("WARN: %s: ", tag);
78 va_start (args, format);
79 vprintf(format, args);
85 void logError(const char * tag, const char * format, ...) {
88 va_start (args, format);
89 __android_log_vprint(ANDROID_LOG_ERROR, tag, format, args);
91 #elif defined __linux__
92 printf("ERROR: %s: ", tag);
94 va_start (args, format);
95 vprintf(format, args);
101 void logFatal(const char * tag, const char * format, ...) {
104 va_start (args, format);
105 __android_log_vprint(ANDROID_LOG_FATAL, tag, format, args);
107 #elif defined __linux__
108 printf("FATAL: %s: ", tag);
110 va_start (args, format);
111 vprintf(format, args);