Go to the source code of this file.
Namespaces | |
| Hog::LoggerLib | |
Functions | |
| setDebugMode mode | |
| getDebugMode | |
| printDebugMode | |
| dictSafeGet d args | |
| Safely get a value from a dictionary. More... | |
| NotifyEnabled | |
| Check if desktop notifications have been enabled by the user. More... | |
| NotifyUrgency level | |
| Map a Hog severity level onto a notification urgency. More... | |
| Notify level message ?title? | |
| Send a desktop notification on Linux through the notify-send helper. More... | |
| Msg level fmsg ?title? | |
| The Hog Printout Msg function. More... | |
| MsgAndLog msg ?severity? ?outFile? | |
| Prints a message with selected severity and optionally write into a log file. More... | |
| Logo ?repo_path? | |
| PrintFileContent filename | |
| PrintFileTree data repo_path ?indentation? | |
| Hog::LoggerLib::GetUserFilePath filename | |
| gets the full path to the file in the user home folder More... | |
| Hog::LoggerLib::ParseTOML toml_file | |
| Parse a TOML format file and return the data as a dictionary. More... | |
| Hog::LoggerLib::ParseTOMLValue value | |
| Parse a TOML value and convert it to appropriate TCL type. More... | |
| Hog::LoggerLib::GetTOMLValue toml_dict key_path | |
| Get a value from a TOML dictionary using dot notation. More... | |
| Hog::LoggerLib::PrintTOMLDict toml_dict ?indent? | |
| Print a TOML dictionary in a readable format. More... | |
| Hog::LoggerLib::GetTOMLDict | |
| Access the dictionary of the parsed TOML file. More... | |
Function Documentation
◆ dictSafeGet()
| dictSafeGet | d args | ||
Safely get a value from a dictionary.
- Parameters
-
[in] d The dictionary to search [in] args The keys to look for
Definition at line 45 of file Logger.tcl.
◆ getDebugMode()
| getDebugMode |
Definition at line 27 of file Logger.tcl.
◆ Logo()
| Logo | ?repo_path? | ||
Definition at line 251 of file Logger.tcl.
◆ Msg()
| Msg | level fmsg ?title? | ||
The Hog Printout Msg function.
- Parameters
-
[in] level The severity level (status, info, warning, critical, error, debug) [in] msg The message to print [in] title The title string to be included in the header of the message [Hog:$title] (default "")
Definition at line 157 of file Logger.tcl.
◆ MsgAndLog()
| MsgAndLog | msg ?severity? ?outFile? | ||
Prints a message with selected severity and optionally write into a log file.
- Parameters
-
[in] msg The message to print [in] severity The severity of the message [in] outFile The path of the output logfile
Definition at line 232 of file Logger.tcl.
◆ Notify()
| Notify | level message ?title? | ||
Send a desktop notification on Linux through the notify-send helper.
Notifications are opt-in: nothing is sent unless the HOG_NOTIFY environment variable is enabled, see NotifyEnabled.
the helper is run detached and silenced: a notification that cannot be delivered, for example over ssh or with no notification daemon running, is dropped without interrupting the build.
- Parameters
-
[in] level The severity level, in any of the forms accepted by Msg [in] message The body of the notification [in] title The title of the notification (default "Hog <level>")
Definition at line 113 of file Logger.tcl.
◆ NotifyEnabled()
| NotifyEnabled |
Check if desktop notifications have been enabled by the user.
Notifications are opt-in and controlled by the HOG_NOTIFY environment variable, which may be set to 1, true, yes, on or enabled.
- Returns
- 1 if notifications are enabled, 0 otherwise
Definition at line 71 of file Logger.tcl.
◆ NotifyUrgency()
| NotifyUrgency | level | ||
Map a Hog severity level onto a notification urgency.
- Parameters
-
[in] level The name of the severity level, as passed to Msg
- Returns
- one of "low", "normal" or "critical"
Definition at line 85 of file Logger.tcl.
◆ printDebugMode()
| printDebugMode |
Definition at line 32 of file Logger.tcl.
◆ PrintFileContent()
| PrintFileContent | filename | ||
Definition at line 301 of file Logger.tcl.
◆ PrintFileTree()
| PrintFileTree | data repo_path ?indentation? | ||
Print a tree-like structure of Hog list file content
- Parameters
-
[in] data the list of lines read from a list file [in] repo_path the path of the repository [in] indentation a string containing a number of spaces to indent the tree
Definition at line 322 of file Logger.tcl.
◆ setDebugMode()
| setDebugMode | mode | ||
Definition at line 22 of file Logger.tcl.
