yasmin.logs module
- yasmin.logs.YASMIN_LOG_DEBUG(text: str) None
Log a debug message with the caller’s information.
This function formats the log message to include the file name, function name, and line number where the log function was called.
@param text: The debug message to log. @type text: str
@return: None
- yasmin.logs.YASMIN_LOG_ERROR(text: str) None
Log an error message with the caller’s information.
This function formats the log message to include the file name, function name, and line number where the log function was called.
@param text: The error message to log. @type text: str
@return: None
- yasmin.logs.YASMIN_LOG_INFO(text: str) None
Log an informational message with the caller’s information.
This function formats the log message to include the file name, function name, and line number where the log function was called.
@param text: The informational message to log. @type text: str
@return: None
- yasmin.logs.YASMIN_LOG_WARN(text: str) None
Log a warning message with the caller’s information.
This function formats the log message to include the file name, function name, and line number where the log function was called.
@param text: The warning message to log. @type text: str
@return: None
- yasmin.logs.get_caller_info()
Retrieve information about the caller of the current function.
This function inspects the call stack to obtain the file name, function name, and line number of the caller.
@return: A tuple containing the file name, function name, and line number. @rtype: tuple[str, str, int]
- yasmin.logs.set_loggers(info: Callable[[str], None], warn: Callable[[str], None], debug: Callable[[str], None], error: Callable[[str], None]) None
Set custom logger functions for YASMIN logging.
This function assigns user-defined logging functions for different log levels: info, warning, debug, and error.
@param info: A callable function for logging informational messages. @type info: Callable[[str], None]
@param warn: A callable function for logging warning messages. @type warn: Callable[[str], None]
@param debug: A callable function for logging debug messages. @type debug: Callable[[str], None]
@param error: A callable function for logging error messages. @type error: Callable[[str], None]
@return: None
@raises TypeError: If any of the parameters are not callable.