Display_Lib_RPI 2.3.0
A C++ Library to connect electronic displays to Linux single board computers.
Loading...
Searching...
No Matches
Functions | Variables
rdlib_config Namespace Reference

Name space for config file related utilities. More...

Functions

void loadConfig ()
 This function loads the config file into program.
 
bool isLoggingEnabled ()
 retrieve the logging enabled setting , true for logging on
 
bool isDebugEnabled ()
 retrieve the debug enabled setting , true for debug on
 
std::string getErrorLogPath ()
 retrieve the log file path setting
 

Variables

bool LOGGING_ENABLED = false
 
bool DEBUG_ENABLED = false
 
std::string ERROR_LOG_PATH = "/tmp/error.log"
 

Detailed Description

Name space for config file related utilities.

Function Documentation

◆ getErrorLogPath()

std::string rdlib_config::getErrorLogPath ( )

retrieve the log file path setting

Returns
path to the log file

◆ isDebugEnabled()

bool rdlib_config::isDebugEnabled ( )

retrieve the debug enabled setting , true for debug on

Returns
If debug is enabled

◆ isLoggingEnabled()

bool rdlib_config::isLoggingEnabled ( )

retrieve the logging enabled setting , true for logging on

Returns
If logging is enabled

◆ loadConfig()

void rdlib_config::loadConfig ( )

This function loads the config file into program.

if config file does not exist it creates it at ($HOME)/.config/rdlib_config/config.cfg. if ($HOME) not set uses pwd. Defaults debug and logging settings to false. config file sets 3 settings

  1. LOGGING_ENABLED=false
  2. DEBUG_ENABLED=false
  3. ERROR_LOG_PATH="/tmp/error.log"

Variable Documentation

◆ DEBUG_ENABLED

bool rdlib_config::DEBUG_ENABLED = false

is global debug enabled ?

◆ ERROR_LOG_PATH

std::string rdlib_config::ERROR_LOG_PATH = "/tmp/error.log"

path to the log file

◆ LOGGING_ENABLED

bool rdlib_config::LOGGING_ENABLED = false

is logging enabled ?