Logger¶
This module implements SKALogger device, a generic base device for logging for SKA. It enables to view on-line logs through the TANGO Logging Services and to store logs using Python logging. It configures the log levels of remote logging for selected devices.
Tango Device Class¶
-
class
ska_tango_base.
SKALogger
(*args: Any, **kwargs: Any)[source]¶ A generic base device for Logging for SKA.
-
always_executed_hook
()[source]¶ Method that is always executed before any device command gets executed.
-
class
SetLoggingLevelCommand
(target, state_model, logger=None)[source]¶ A class for the SKALoggerDevice’s SetLoggingLevel() command.
Constructor for SetLoggingLevelCommand
- Parameters
target (object) – the object that this command acts upon; for example, the SKASubarray device for which this class implements the command
state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses to check that it is allowed to run, and that it drives with actions.
logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
do
(argin)[source]¶ Stateless hook for SetLoggingLevel() command functionality.
- Returns
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Return type
(ResultCode, str)
-
SetLoggingLevel
(argin)[source]¶ Sets logging level of the specified devices.
To modify behaviour for this command, modify the do() method of the command class.
- Parameters
argin (
tango.DevVarLongStringArray
) –Array consisting of
argin[0]: list of DevLong. Desired logging level.
argin[1]: list of DevString. Desired tango device.
- Returns
None.
-