---
title: "The Default Logger"
url: https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# The Default Logger

Parts of this page are for some programming languages only, and name them. For one language's text alone, see [C++](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/csharp.md), [Java](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/php.md), [Python](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/ruby.md), and [Swift](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/swift.md).

When you create a communicator without supplying a [logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility.md) or selecting a [built-in logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers.md), the communicator uses the [per-process logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/per-process-logger.md) if you installed a custom one, and Ice's default logger otherwise. (C++, Java, Python, Ruby, PHP, MATLAB, and Swift: 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 Communicator ([C++](https://code.zeroc.com/ice/3.8/api/cpp/classIce_1_1Communicator.html), [C#](https://code.zeroc.com/ice/3.8/api/csharp/api/Ice.Communicator.html), [Java](https://code.zeroc.com/ice/3.8/api/java/com.zeroc.ice/com/zeroc/Ice/Communicator.html), [JavaScript](https://code.zeroc.com/ice/3.8/api/javascript/Ice/Communicator.html), [Python](https://code.zeroc.com/ice/3.8/api/python/Ice.Communicator.html), and [Swift](https://code.zeroc.com/ice/3.8/api/swift/documentation/ice/communicator)).

> **C++**
>
> 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](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/cpp.md#ice.stderr), or if you set [Ice.LogStdErr.Convert](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/cpp.md#ice.logstderr.convert) to `0`.

> **C#**
>
> The default logger writes its messages with the `System.Diagnostics.Trace` class, as described in [Built-in Loggers](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/csharp.md).

> **JavaScript**
>
> The default logger writes its messages with `console.log`: to the standard output in Node.js, and to the console in a browser.

## See Also

- [Logger Facility](https://docs.zeroc.com/ice/3.8/administration/logger-facility.md)
