![]() |
Terarea
2
The automation project
|
Public Member Functions | |
None | __init__ (self, RuntimeData runtime_data, int success=0, int error=84, bool debug=False) |
int | log_event (self, str log_type, int action_id=0, int code=ACONST.CODE_ERROR, Union[str, None] message=None, bool resolved=False) |
int | log_info (self, str log_type, int action_id=0, Union[str, None] message=None, bool resolved=False) |
int | log_success (self, str log_type, int action_id=0, Union[str, None] message=None, bool resolved=False) |
int | log_debug (self, str log_type, int action_id=0, Union[str, None] message=None, bool resolved=False) |
int | log_warning (self, str log_type, int action_id=0, Union[str, None] message=None, bool resolved=False) |
int | log_error (self, str log_type, int action_id=0, Union[str, None] message=None, bool resolved=False) |
int | log_critical (self, str log_type, int action_id=0, Union[str, None] message=None, bool resolved=False) |
int | log_fatal (self, str log_type, int action_id=0, Union[str, None] message=None, bool resolved=False) |
int | log_unknown (self, str log_type, int action_id=0, Union[str, None] message=None, bool resolved=False) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs (self, Union[int, None] action_id=None, Union[int, None] code=None, bool beautify=True) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs_unknown (self, Union[int, None] action_id=None, bool beautify=True) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs_info (self, Union[int, None] action_id=None, bool beautify=True) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs_success (self, Union[int, None] action_id=None, bool beautify=True) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs_debug (self, Union[int, None] action_id=None, bool beautify=True) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs_warning (self, Union[int, None] action_id=None, bool beautify=True) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs_error (self, Union[int, None] action_id=None, bool beautify=True) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs_critical (self, Union[int, None] action_id=None, bool beautify=True) |
Union[List[Union[Dict[str, Any], List[Any]]], int] | get_logs_fatal (self, Union[int, None] action_id=None, bool beautify=True) |
Data Fields | |
error = error | |
debug = debug | |
success = success | |
runtime_data = runtime_data | |
Disp | disp |
Protected Member Functions | |
bool | _check_if_action_id_in_table (self, int action_id=0) |
_summary_ Class in charge of logging events into the logging database
None src.lib.actions.logger.ActionLogger.__init__ | ( | self, | |
RuntimeData | runtime_data, | ||
int | success = 0, | ||
int | error = 84, | ||
bool | debug = False ) |
_summary_ Class in charge of logging events into the logging database Args: runtime_data (RuntimeData): _description_ success (int, optional): _description_. Defaults to 0. error (int, optional): _description_. Defaults to 84. debug (bool, optional): _description_. Defaults to False.
|
protected |
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs | ( | self, | |
Union[int, None] | action_id = None, | ||
Union[int, None] | code = None, | ||
bool | beautify = True ) |
_summary_ Get the logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. code (Union[int, None], optional): _description_: Specify a code to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs_critical | ( | self, | |
Union[int, None] | action_id = None, | ||
bool | beautify = True ) |
_summary_ Get the critical logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs_debug | ( | self, | |
Union[int, None] | action_id = None, | ||
bool | beautify = True ) |
_summary_ Get the debug logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs_error | ( | self, | |
Union[int, None] | action_id = None, | ||
bool | beautify = True ) |
_summary_ Get the error logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs_fatal | ( | self, | |
Union[int, None] | action_id = None, | ||
bool | beautify = True ) |
_summary_ Get the fatal logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs_info | ( | self, | |
Union[int, None] | action_id = None, | ||
bool | beautify = True ) |
_summary_ Get the info logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs_success | ( | self, | |
Union[int, None] | action_id = None, | ||
bool | beautify = True ) |
_summary_ Get the success logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs_unknown | ( | self, | |
Union[int, None] | action_id = None, | ||
bool | beautify = True ) |
_summary_ Get the unknown logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
Union[List[Union[Dict[str, Any], List[Any]]], int] src.lib.actions.logger.ActionLogger.get_logs_warning | ( | self, | |
Union[int, None] | action_id = None, | ||
bool | beautify = True ) |
_summary_ Get the warning logs from the database Args: action_id (Union[int, None], optional): _description_: Specify an action id to narrow down the results. beautify (bool, optional): _description_: Set to True if you wish to beautify the output Returns: Union[List[Dict[str, Any]], int]: _description_: Returns the logs if it succeeds, self.error otherwise
int src.lib.actions.logger.ActionLogger.log_critical | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an critical event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns self.success if it succeeds, self.error otherwise
int src.lib.actions.logger.ActionLogger.log_debug | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an debug event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns self.success if it succeeds, self.error otherwise
int src.lib.actions.logger.ActionLogger.log_error | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an error event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns self.success if it succeeds, self.error otherwise
int src.lib.actions.logger.ActionLogger.log_event | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
int | code = ACONST.CODE_ERROR, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 code (int, optional): _description_: The code of the event, defaults to ACONST.CODE_ERROR message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns 0 if it succeeds, 84 otherwise
int src.lib.actions.logger.ActionLogger.log_fatal | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an fatal event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns self.success if it succeeds, self.error otherwise
int src.lib.actions.logger.ActionLogger.log_info | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an info event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns self.success if it succeeds, self.error otherwise
int src.lib.actions.logger.ActionLogger.log_success | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an success event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns self.success if it succeeds, self.error otherwise
int src.lib.actions.logger.ActionLogger.log_unknown | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an unknown event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns self.success if it succeeds, self.error otherwise
int src.lib.actions.logger.ActionLogger.log_warning | ( | self, | |
str | log_type, | ||
int | action_id = 0, | ||
Union[str, None] | message = None, | ||
bool | resolved = False ) |
_summary_ Log an warning event into the logging database Args: log_type (str): _description_: The type of the event action_id (int, optional): _description_: The id of the action that triggered the event, defaults to 0 message (Union[str, None], optional): _description_: The message of the event, defaults to None resolved (bool, optional): _description_: The status of the event, defaults to False Returns: int: _description_: Returns self.success if it succeeds, self.error otherwise
Disp src.lib.actions.logger.ActionLogger.disp |
src.lib.actions.logger.ActionLogger.runtime_data = runtime_data |