RDK Documentation (Open Sourced RDK Components)
rdk_debug_priv.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 #if !defined(_RDK_DBG_PRIV_H)
21 #define _RDK_DBG_PRIV_H
22 
23 #include <rdk_logger_types.h>
24 #include <rdk_debug.h>
25 #include <rdk_error.h>
26 
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31 
32 /** Maximum limit on the number of Modules logged*/
33 
34 #define RDK_MAX_MOD_COUNT 512
35 
36 /** This variable is described in rdk_dbg_priv_log.c - to be used by
37  * rdk_debug_priv_.* files only.
38  */
39 extern uint32_t rdk_g_logControlTbl[];
40 extern rdk_logger_Bool dbg_logViaUDP;
41 
42 /**
43  * The <i>rdk_logger_envGet()</i> function will get the value of the specified
44  * environment variable.
45  *
46  * @param name is a pointer to the name of the target environment variable.
47  *
48  * @return a pointer to the associated string value of the target environment
49  * variable or NULL if the variable can't be found.
50  */
51 const char* rdk_logger_envGet(const char *name);
52 
53 /**
54  * The <i>rdk_logger_env_add_conf_file()</i> function sets up the environment variable
55  * storage by parsing configuration file.
56  *
57  * @param path Path of the file.
58  * @return Returns relevant RDK_OSAL error code on failure, otherwise <i>RDK_SUCCESS</i>
59  * is returned.
60  */
61 rdk_Error rdk_logger_env_add_conf_file(const char * path);
62 
64 void rdk_dbg_priv_Init(void);
65 void rdk_dbg_priv_Shutdown();
66 const char * rdk_dbg_priv_LogControlOpSysIntf(char *logName, char *cfgStr);
67 const char * rdk_dbg_priv_LogQueryOpSysIntf(char *modName, char *cfgStr, int cfgStrMaxLen);
68 void rdk_debug_priv_log_msg( rdk_LogLevel level,
69  int module, const char *module_name, const char* format, va_list args);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* _RDK_DBG_PRIV_H */
76 
dbg_logViaUDP
rdk_logger_Bool dbg_logViaUDP
Definition: rdk_debug_priv.c:123
rdk_debug.h
rdk_g_logControlTbl
uint32_t rdk_g_logControlTbl[]
Definition: rdk_debug_priv.c:120
rdk_logger_envGet
const char * rdk_logger_envGet(const char *name)
This function will get value of the specified environment variable.
Definition: rdk_logger_util.c:203
rdk_LogLevel
rdk_LogLevel
These values represent the logging 'levels' or 'types', they are each independent.
Definition: rdk_debug.h:157
rdk_dbg_priv_LogControlInit
void rdk_dbg_priv_LogControlInit(void)
Definition: rdk_debug_priv.c:366
rdk_logger_env_add_conf_file
rdk_Error rdk_logger_env_add_conf_file(const char *path)
This Function sets up the environment variable cache by parsing configuration file and adding each na...
Definition: rdk_logger_util.c:97
rdk_dbg_priv_LogQueryOpSysIntf
const char * rdk_dbg_priv_LogQueryOpSysIntf(char *modName, char *cfgStr, int cfgStrMaxLen)
Definition: rdk_debug_priv.c:490