RDK Documentation (Open Sourced RDK Components)
vrexLogInternal.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 
21 
22 /**
23 * @defgroup iarmmgrs
24 * @{
25 * @defgroup vrexmgr
26 * @{
27 **/
28 
29 
30 #ifndef __VREX_LOG_INTERNAL_H__
31 #define __VREX_LOG_INTERNAL_H__
32 
33 #include <stdio.h>
34 
35 #ifdef RDK_LOGGER_ENABLED
36 #include "rdk_debug.h"
37 #include "iarmUtil.h"
38 
39 #ifdef __cplusplus
40 extern "C"
41 {
42 #endif
43 
44 extern int b_rdk_logger_enabled;
45 
46 #ifdef __cplusplus
47 extern "C"
48 }
49 #endif
50 
51 #define INT_LOG(...) if(b_rdk_logger_enabled) {\
52 RDK_LOG(RDK_LOG_DEBUG, "LOG.RDK.VREXMGR", __VA_ARGS__);\
53 }\
54 else\
55 {\
56 printf(__VA_ARGS__);\
57 }
58 
59 #else /* RDK_LOGGER_ENABLED */
60 
61 #define INT_LOG(...) printf(__VA_ARGS__)
62 
63 #endif /* RDK_LOGGER_ENABLED */
64 
65 #define LOG(...) INT_LOG("VREXMGR: " __VA_ARGS__)
66 #define STATUS_LOG(...) LOG("IARMSTATUS: " __VA_ARGS__)
67 
68 
69 #endif /* __VREX_LOG_INTERNAL_H__ */
70 
71 
72 /** @} */
73 /** @} */
rdk_debug.h