Logger Device

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.

class LoggerComponentManager(logger: Logger, communication_state_callback: Optional[Callable[[CommunicationStatus], None]] = None, component_state_callback: Optional[Callable[[...], None]] = None, **state: Any)[source]

A stub for an logger component manager.

class SKALogger(*args: Any, **kwargs: Any)[source]

A generic base device for Logging for SKA.

init_command_objects() None[source]

Set up the command objects.

create_component_manager() ComponentManagerT[source]

Create and return the component manager for this device.

Returns:

None, this device doesn’t have a component manager

class SetLoggingLevelCommand(logger: Optional[Logger] = None, validator: Optional[ArgumentValidator] = None)[source]

A class for the SKALoggerDevice’s SetLoggingLevel() command.

do(*args: Any, **kwargs: Any) tuple[ska_control_model.result_code.ResultCode, str][source]

Stateless hook for SetLoggingLevel() command functionality.

Parameters:
  • args – positional arguments to the command. This command takes a single positional argument, which is a tuple consisting of list of logging levels and list of tango devices.

  • kwargs – keyword arguments to the command. This command does not take any, so this should be empty.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

main(*args: str, **kwargs: str) int[source]

Entry point for module.

Parameters:
  • args – positional arguments

  • kwargs – named arguments

Returns:

exit code