RDK Documentation (Open Sourced RDK Components)
RDK Logger Utils APIs

Description

Describe the details about RDK Logger utils API specifications.

const char * rdk_logger_envGet (const char *name)
 This function will get value of the specified environment variable. More...
 
int rdk_logger_envGetNum (const char *mod)
 Function will give the registered number of the specified environment variable. More...
 
const char * rdk_logger_envGetValueFromNum (int number)
 This function is used to get the value of the specified environment variable based on its registered number. More...
 
const char * rdk_logger_envGetModFromNum (int Num)
 This function is used to get the name of the specified environment variable based on its registered number. More...
 
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 name/value pairs to the list. More...
 

Function Documentation

◆ rdk_logger_envGet()

const char* rdk_logger_envGet ( const char *  name)

This function will get value of the specified environment variable.

Parameters
[in]nameIt is a pointer to the name of the target environment variable.
Returns
Returns a pointer to the associated string value of the target environment variable or return NULL if the variable can't be found.

Definition at line 203 of file rdk_logger_util.c.

◆ rdk_logger_envGetNum()

int rdk_logger_envGetNum ( const char *  mod)

Function will give the registered number of the specified environment variable.

Parameters
[in]modIt is a pointer to the name of the target environment variable.
Returns
Returns an integer value if the call is success otherwise returns -1.

Definition at line 257 of file rdk_logger_util.c.

◆ rdk_logger_envGetValueFromNum()

const char* rdk_logger_envGetValueFromNum ( int  number)

This function is used to get the value of the specified environment variable based on its registered number.

Parameters
[in]numberIs a registered number of the target environment variable.
Returns
Returns a pointer to the associated string value of the target environment. variable or return NULL in failure condition.

Definition at line 231 of file rdk_logger_util.c.

◆ rdk_logger_envGetModFromNum()

const char* rdk_logger_envGetModFromNum ( int  Num)

This function is used to get the name of the specified environment variable based on its registered number.

Parameters
[in]NumIs a registered number of the target environment variable.
Returns
Returns a pointer to the associated string value of the target environment variable associated for registered number. Return NULL if the environment variable can't be found for registered number.

Definition at line 285 of file rdk_logger_util.c.

◆ 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 name/value pairs to the list.

Parameters
[in]pathPath of the configuration file.
Returns
Returns Returns RDK_SUCCESS if the setting of environment variable is successful else it returns -1.

Definition at line 97 of file rdk_logger_util.c.