Python YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
yasmin.logs Namespace Reference

Functions

 get_caller_info ()
 
None YASMIN_LOG_ERROR (str text)
 
None YASMIN_LOG_WARN (str text)
 
None YASMIN_LOG_INFO (str text)
 
None YASMIN_LOG_DEBUG (str text)
 
None set_loggers (Callable[[str], None] info, Callable[[str], None] warn, Callable[[str], None] debug, Callable[[str], None] error)
 

Variables

list __all__
 
 level
 
 NOTSET
 
 format
 

Function Documentation

◆ get_caller_info()

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]

◆ set_loggers()

None yasmin.logs.set_loggers ( Callable[[str], None] info,
Callable[[str], None] warn,
Callable[[str], None] debug,
Callable[[str], None] error )
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.

◆ YASMIN_LOG_DEBUG()

None yasmin.logs.YASMIN_LOG_DEBUG ( str text)
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_LOG_ERROR()

None yasmin.logs.YASMIN_LOG_ERROR ( str text)
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_LOG_INFO()

None yasmin.logs.YASMIN_LOG_INFO ( str text)
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_LOG_WARN()

None yasmin.logs.YASMIN_LOG_WARN ( str text)
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

Variable Documentation

◆ __all__

list yasmin.logs.__all__
private
Initial value:
1= [
2 "set_loggers",
3 "YASMIN_LOG_ERROR",
4 "YASMIN_LOG_WARN",
5 "YASMIN_LOG_INFO",
6 "YASMIN_LOG_DEBUG",
7 "get_caller_info",
8]

◆ format

yasmin.logs.format

◆ level

yasmin.logs.level

◆ NOTSET

yasmin.logs.NOTSET