Ice.Logger

class Ice.Logger

Bases: ABC

Represents Ice’s abstraction for logging and tracing.

Applications can provide their own logger by implementing this abstraction and setting a logger on the communicator.

abstractmethod print(message: str)

Prints a message.

The message is printed literally, without any decorations such as executable name or timestamp.

Parameters:

message (str) – The message to log.

abstractmethod trace(category: str, message: str)

Logs a trace message.

Parameters:
  • category (str) – The trace category.

  • message (str) – The trace message to log.

abstractmethod warning(message: str)

Logs a warning message.

Parameters:

message (str) – The warning message to log.

abstractmethod error(message: str)

Logs an error message.

Parameters:

message (str) – The error message to log.

abstractmethod getPrefix() str

Returns this logger’s prefix.

Returns:

The prefix.

Return type:

str

abstractmethod cloneWithPrefix(prefix: str) Logger

Returns a clone of the logger with a new prefix.

Parameters:

prefix (str) – The new prefix for the logger.

Returns:

A new logger instance with the specified prefix.

Return type:

Ice.Logger