---
title: "Built-in Loggers"
url: https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers
language: csharp
docs_index: https://docs.zeroc.com/llms.txt
---

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

# Built-in Loggers

Programming language: C#. Other languages: [C++](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/cpp.md), [Java](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/php.md), [Python](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/ruby.md), [Swift](https://docs.zeroc.com/ice/3.8/administration/logger-facility/built-in-loggers/swift.md).

Ice provides a file logger and, depending on the language mapping and platform, loggers that write to a system logging service. You select one of these loggers with properties.

## File Logger

Setting the [Ice.LogFile](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/csharp.md#ice.logfile) property selects the file-based logger. This logger appends its messages to the specified file and creates the file if necessary.

## .NET Logger

The default logger in Ice for C# writes its messages with the `System.Diagnostics.Trace` class. By default, Ice adds its own console listener, which writes to `stderr`. You can disable the logging of messages via this trace listener by setting the property [Ice.ConsoleListener](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/csharp.md#ice.consolelistener) to `0`.

You can add your own trace listener programmatically. For example:

```csharp
// Create a trace listener for the event log.
EventLogTraceListener myTraceListener =
    new EventLogTraceListener("myEventLogSource");

// Add the event log trace listener to the collection.
Trace.Listeners.Add(myTraceListener);
```

## See Also

- [Service Logging Considerations](https://docs.zeroc.com/ice/3.8/background-servers/service-logging-considerations.md)
