3 * Copyright 2012 Samsung Electronics S.LSI Co. LTD
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 * @file Exynos_OSAL_Log.h
21 * @author Yunji Kim (yunji.kim@samsung.com)
25 * 2012.8.27 : Add trace function
28 #ifndef EXYNOS_OSAL_LOG
29 #define EXYNOS_OSAL_LOG
36 #ifndef EXYNOS_LOG_OFF
40 #ifndef EXYNOS_LOG_TAG
41 #define EXYNOS_LOG_TAG "EXYNOS_LOG"
44 #ifdef EXYNOS_TRACE_ON
47 #endif /* SLP_PLATFORM */
49 typedef enum _LOG_LEVEL
63 #define Exynos_OSAL_Log(a, ...) ((void)_Exynos_OSAL_Log(a, EXYNOS_LOG_TAG, __VA_ARGS__))
65 #define Exynos_OSAL_Log(a, ...) \
67 if (a == EXYNOS_LOG_ERROR) \
68 ((void)_Exynos_OSAL_Log(a, EXYNOS_LOG_TAG, __VA_ARGS__)); \
73 #define FunctionIn() _Exynos_OSAL_Log(EXYNOS_LOG_TRACE, EXYNOS_LOG_TAG, "%s In , Line: %d", __FUNCTION__, __LINE__)
74 #define FunctionOut() _Exynos_OSAL_Log(EXYNOS_LOG_TRACE, EXYNOS_LOG_TAG, "%s Out , Line: %d", __FUNCTION__, __LINE__)
76 #define FunctionIn() ((void *)0)
77 #define FunctionOut() ((void *)0)
80 #else /* SLP_PLATFORM */
82 #define OMX_DEBUG_LEVEL 2 /* EXYNOS_LOG_INFO */
84 #define ALOGV(...) Exynos_OSAL_Log(EXYNOS_LOG_VERVOSE, __VA_ARGS__)
85 #define ALOGD(...) Exynos_OSAL_Log(EXYNOS_LOG_TRACE, __VA_ARGS__)
86 #define ALOGI(...) Exynos_OSAL_Log(EXYNOS_LOG_INFO, __VA_ARGS__)
87 #define ALOGW(...) Exynos_OSAL_Log(EXYNOS_LOG_WARNING, __VA_ARGS__)
88 #define ALOGE(...) Exynos_OSAL_Log(EXYNOS_LOG_ERROR, __VA_ARGS__)
90 #ifndef EXYNOS_LOG_TAG
91 #define Exynos_OSAL_Log(a, ...) _Exynos_OSAL_Log(a, "EXYNOS_LOG", __VA_ARGS__)
92 #define FunctionIn() _Exynos_OSAL_Log(EXYNOS_LOG_VERVOSE, "EXYNOS_LOG", "%s In , Line: %d", __FUNCTION__, __LINE__)
93 #define FunctionOut() _Exynos_OSAL_Log(EXYNOS_LOG_VERVOSE, "EXYNOS_LOG", "%s Out , Line: %d", __FUNCTION__, __LINE__)
95 #define Exynos_OSAL_Log(a, ...) _Exynos_OSAL_Log(a, EXYNOS_LOG_TAG, EXYNOS_LOG_TAG"] "__VA_ARGS__)
96 #define FunctionIn() _Exynos_OSAL_Log(EXYNOS_LOG_VERVOSE, EXYNOS_LOG_TAG, EXYNOS_LOG_TAG"] %s In , Line: %d", __FUNCTION__, __LINE__)
97 #define FunctionOut() _Exynos_OSAL_Log(EXYNOS_LOG_VERVOSE, EXYNOS_LOG_TAG, EXYNOS_LOG_TAG"] %s Out , Line: %d", __FUNCTION__, __LINE__)
100 #endif /* SLP_PLATFORM */
102 extern void _Exynos_OSAL_Log(EXYNOS_LOG_LEVEL logLevel, const char *tag, const char *msg, ...);