Hog v9.61.0
Hog::LoggerLib Namespace Reference

Functions

 GetUserFilePath filename
 gets the full path to the file in the user home folder More...
 
 ParseTOML toml_file
 Parse a TOML format file and return the data as a dictionary. More...
 
 ParseTOMLValue value
 Parse a TOML value and convert it to appropriate TCL type. More...
 
 GetTOMLValue toml_dict key_path
 Get a value from a TOML dictionary using dot notation. More...
 
 PrintTOMLDict toml_dict ?indent?
 Print a TOML dictionary in a readable format. More...
 
 GetTOMLDict
 Access the dictionary of the parsed TOML file. More...
 

Function Documentation

◆ GetTOMLDict()

Hog::LoggerLib::GetTOMLDict

Access the dictionary of the parsed TOML file.

Returns
The dictionary containing the parsed TOML data

Definition at line 542 of file Logger.tcl.

◆ GetTOMLValue()

Hog::LoggerLib::GetTOMLValue   toml_dict key_path  

Get a value from a TOML dictionary using dot notation.

Parameters
[in]toml_dictThe dictionary returned by ParseTOML
[in]key_pathThe key path in dot notation (e.g., "section.subsection.key")
Returns
The value if found, or empty string if not found

Definition at line 497 of file Logger.tcl.

◆ GetUserFilePath()

Hog::LoggerLib::GetUserFilePath   filename  

gets the full path to the file in the user home folder

Parameters
[in]filenameThe name of the file to get the path for
Returns
The full path to the file in the user's home directory, or 0 if file doesn't exist

Definition at line 274 of file Logger.tcl.

◆ ParseTOML()

Hog::LoggerLib::ParseTOML   toml_file  

Parse a TOML format file and return the data as a dictionary.

Parameters
[in]toml_fileThe path to the TOML file to parse
Returns
A nested dictionary containing the TOML data, or -1 in case of failure

Definition at line 291 of file Logger.tcl.

◆ ParseTOMLValue()

Hog::LoggerLib::ParseTOMLValue   value  

Parse a TOML value and convert it to appropriate TCL type.

Parameters
[in]valueThe raw value string from TOML
Returns
The parsed value in appropriate TCL format

Definition at line 419 of file Logger.tcl.

◆ PrintTOMLDict()

Hog::LoggerLib::PrintTOMLDict   toml_dict ?indent?  

Print a TOML dictionary in a readable format.

Parameters
[in]toml_dictThe dictionary to print
[in]indentInternal parameter for indentation (default: 0)

Definition at line 515 of file Logger.tcl.