2 // Copyright (c) 2015 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
23 #include <linux/limits.h>
30 #define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
34 #define ALOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
38 #define ALOGD(...) ((void)ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__))
42 #define ALOGW(...) ((void)ALOG(LOG_WARN, LOG_TAG, __VA_ARGS__))
46 #define ALOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
50 #define ALOG(priority, tag, ...) \
51 LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
55 #define LOG_PRI(priority, tag, ...) \
56 android_printLog(priority, tag, __VA_ARGS__)
59 #define android_printLog(prio, tag, fmt...) \
60 __android_log_print(prio, tag, fmt)
62 typedef enum android_LogPriority {
63 ANDROID_LOG_UNKNOWN = 0,
64 ANDROID_LOG_DEFAULT, /* only for SetMinPriority() */
71 ANDROID_LOG_SILENT, /* only for SetMinPriority(); must be last */
72 } android_LogPriority;
74 extern int __android_log_print(int prio, const char *tag, const char *fmt, ...);