- All Superinterfaces:
AutoCloseable
Represents Ice's abstraction for logging and tracing.
Applications can provide their own logger by implementing this interface and setting a logger on the communicator.
The Ice runtime calls print(java.lang.String), trace(java.lang.String, java.lang.String), warning(java.lang.String) and error(java.lang.String) while performing
internal operations, including from its last-resort exception handlers. Implementations of these methods must not
throw exceptions: a thrown exception can leave the Ice runtime in an inconsistent state or terminate an Ice
runtime thread.
-
Method Summary
Modifier and TypeMethodDescriptioncloneWithPrefix(String prefix) Returns a clone of the logger with a new prefix.voidLogs an error message.Returns this logger's prefix.voidPrints a message.voidLogs a trace message.voidLogs a warning message.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
print
Prints a message. The message is printed literally, without any decorations such as executable name or timestamp.An implementation of this method must not throw exceptions.
- Parameters:
message- the message to log
-
trace
Logs a trace message.An implementation of this method must not throw exceptions.
- Parameters:
category- the trace categorymessage- the trace message to log
-
warning
Logs a warning message.An implementation of this method must not throw exceptions.
- Parameters:
message- the warning message to log- See Also:
-
error
Logs an error message.An implementation of this method must not throw exceptions.
- Parameters:
message- the error message to log- See Also:
-
getPrefix
String getPrefix()Returns this logger's prefix.- Returns:
- the prefix
-
cloneWithPrefix
Returns a clone of the logger with a new prefix.- Parameters:
prefix- the new prefix for the logger- Returns:
- a new logger instance with the specified prefix
-