Ice.LoggerAdmin¶
- class Ice.LoggerAdmin¶
-
Represents the admin facet that allows an Ice application to attach its
Ice.RemoteLoggerPrxto 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.RemoteLoggerPrxobject to the local logger. This operation callsIce.RemoteLoggerPrx.initAsync()onprx.- 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
messageTypesis 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.RemoteLoggerPrxobject from the local logger.- Parameters:
prx (RemoteLoggerPrx | None) – A proxy to the remote logger.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
trueif the provided remote logger proxy was detached, andfalseotherwise.- Return type:
- 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
messageTypesis 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]]