Ice.LoggerAdmin

class Ice.LoggerAdmin

Bases: Object, ABC

Represents the admin facet that allows an Ice application to attach its Ice.RemoteLoggerPrx to the local logger of an Ice communicator.

Notes

The Slice compiler generated this skeleton class from Slice interface ::Ice::LoggerAdmin.

abstractmethod attachRemoteLogger(prx: RemoteLoggerPrx | None, messageTypes: list[LogMessageType], traceCategories: list[str], messageMax: int, current: Current) None | Awaitable[None]

Attaches a Ice.RemoteLoggerPrx object to the local logger. This operation calls Ice.RemoteLoggerPrx.initAsync() on prx.

Parameters:
  • prx (RemoteLoggerPrx | None) – A proxy to the remote logger.

  • messageTypes (list[LogMessageType]) – The list of message types that the remote logger wishes to receive. An empty list means no filtering (send all message types).

  • traceCategories (list[str]) – The categories of traces that the remote logger wishes to receive. This parameter is ignored if messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace categories).

  • messageMax (int) – The maximum number of log messages (of all types) to be provided to Ice.RemoteLoggerPrx.initAsync(). A negative value requests all messages available.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

None or an awaitable that completes when the dispatch completes.

Return type:

None | Awaitable[None]

Raises:

RemoteLoggerAlreadyAttachedException – Thrown if this remote logger is already attached to this admin object.

abstractmethod detachRemoteLogger(prx: RemoteLoggerPrx | None, current: Current) bool | Awaitable[bool]

Detaches a Ice.RemoteLoggerPrx object from the local logger.

Parameters:
Returns:

true if the provided remote logger proxy was detached, and false otherwise.

Return type:

bool | Awaitable[bool]

abstractmethod getLog(messageTypes: list[LogMessageType], traceCategories: list[str], messageMax: int, current: Current) tuple[Sequence[LogMessage], str] | Awaitable[tuple[Sequence[LogMessage], str]]

Retrieves recently logged log messages.

Parameters:
  • messageTypes (list[LogMessageType]) – The list of message types that the caller wishes to receive. An empty list means no filtering (send all message types).

  • traceCategories (list[str]) – The categories of traces that caller wish to receive. This parameter is ignored if messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace categories).

  • messageMax (int) – The maximum number of log messages (of all types) to be returned. A negative value requests all messages available.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

A tuple containing:
  • Sequence[LogMessage] The Log messages.

  • str The prefix of the associated local logger.

Return type:

tuple[Sequence[LogMessage], str] | Awaitable[tuple[Sequence[LogMessage], str]]

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str