The Default Logger
2 min read
When you create a communicator without supplying a logger or selecting a built-in logger, the communicator uses the per-process logger if you installed a custom one, and Ice's default logger otherwise. The default logger writes its messages to the standard error output. The trace operation accepts a category parameter in addition to the error message; this allows you to separate trace output from different subsystems by sending the output through a filter.
You can obtain the logger that is attached to a communicator using the getLogger method on CommunicatorCommunicatorCommunicatorCommunicatorCommunicatorCommunicatorCommunicator.
On Windows, when the default C++ logger outputs a log message to the console, it converts this message from your narrow string encoding (as defined by narrow string converter you installed, if any) to your console code page. This conversion is disabled if you redirect standard error to a file with Ice.StdErr, or if you set Ice.LogStdErr.Convert to 0.
The default logger writes its messages with the System.Diagnostics.Trace class, as described in Built-in Loggers.
The default logger writes its messages with console.log: to the standard output in Node.js, and to the console in a browser.