utils¶
This module’s scope covers interactions with the logging facilities.
-
tuna.log.utils.
function_header
()[source]¶ This method’s goal is to log function entry-point capturing relevant debug information.
No parameter is needed, since all relevant information is obtained through the sys Python module.
Returns:
- result : string
Containing the signature of the caller function.
-
tuna.log.utils.
function_name
()[source]¶ This method’s goal is to access the name of the caller function.
Returns:
- unnamed variable : string
Containing the function name of the caller.
-
tuna.log.utils.
line_number
()[source]¶ This method’s goal is to provide the line number from which the caller called this function, for logging purposes.
Returns:
- unnamed variable : int
Containing the line number (in the relevant source file) from which the caller called.
-
tuna.log.utils.
script_name
()[source]¶ This method’s goal is to access the name of the script currently being processed.
Returns:
- unnamed variable : string
Containing the name of the command used to start the current session.
-
tuna.log.utils.
set_path
(file_name)[source]¶ This method’s goal is to set the path and file name where the log output will be saved.
Parameters:
- file_name : string
Containing a valid path and file name for a text file, where new log entries will be appended.
-
tuna.log.utils.
verbose
(handler_type='all', verbosity='WARNING')[source]¶ This method’s goal is to set the specified logging handler type to the specified verbosity.
Parameters:
- handler_type : string : “all”
Can be either “all”, “console” or “file”.
- verbosity : string : “WARNING”
Must be the name of a level from the logging module, such as “DEBUG” or “INFO”.