Custom Loggers

2 min read

2 min read

You have several options if you wish to install a logger other than the default one:

A custom logger lets you integrate the messages the Ice runtime logs into your application's logging framework: your Logger implementation forwards each log message to this framework.

A custom logger implements the LoggerLoggerLoggerLoggerLoggerLogger interface, whose methods are described in Logger Facility. The Ice runtime calls the logger from its own threads, concurrently, so the implementation must be thread-safe.

Logger extends AutoCloseable. When you destroy a communicator, the communicator closes the logger it created from Ice.LogFile or Ice.UseSyslog, and the logger installed by a logger plug-in. You manage the lifetime of a logger you supply in InitializationData or install with setProcessLogger (see The Per-Process Logger).

Logger extends IDisposable. When you destroy a communicator, the communicator disposes the logger it created, either from Ice.LogFile or as its default logger, and the logger installed by a logger plug-in. You manage the lifetime of a logger you supply in InitializationData or install with setProcessLogger (see The Per-Process Logger).