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: Callable[[CommunicationStatus], None] | None = None, component_state_callback: Callable[[...], None] | 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: Logger | None = None, validator: ArgumentValidator | None = None)[source]

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

do(*args: Any, **kwargs: Any) tuple[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.

SetLoggingLevel(argin: tuple[list[ResultCode], list[str]]) tuple[list[ResultCode], list[str]]

Set the logging level of the specified devices.

To modify behaviour for this command, modify the do() method of the command class.

Parameters:

argin

Array consisting of

  • argin[0]: list of DevLong. Desired logging level.

  • argin[1]: list of DevString. Desired tango device.

Returns:

ResultCode & message.

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

Entry point for module.

Parameters:
  • args – positional arguments

  • kwargs – named arguments

Returns:

exit code