---
title: "Logger Facility"
url: https://docs.zeroc.com/ice/3.8/administration/logger-facility
language: cpp
docs_index: https://docs.zeroc.com/llms.txt
---

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

# Logger Facility

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

The Ice runtime logs trace messages, warnings, and errors through the [Logger](https://code.zeroc.com/ice/3.8/api/cpp/classIce_1_1Logger.html) interface. The [Ice.Trace.\*](https://docs.zeroc.com/ice/3.8/property-reference/ice-trace-properties/cpp.md) and [Ice.Warn.\*](https://docs.zeroc.com/ice/3.8/property-reference/ice-warn-properties/cpp.md) properties select which trace messages and warnings it logs.

A logger provides one method for each kind of message:

- `print` logs a message as is, without a timestamp or prefix.
- `trace` logs a trace message in a category.
- `warning` logs a warning.
- `error` logs an error.

The `Ice::Print`, `Ice::Trace`, `Ice::Warning`, and `Ice::Error` helper classes let you compose a message with the `<<` operator. The helper sends the message to the logger when you call `flush` or when the helper is destroyed:

```cpp
Ice::Trace out{communicator->getLogger(), "Greeter"};
out << "greeting " << name;
```

## See Also

- [Properties and Configuration](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/cpp.md)
- [Ice.Trace.\*](https://docs.zeroc.com/ice/3.8/property-reference/ice-trace-properties/cpp.md)
- [Ice.Warn.\*](https://docs.zeroc.com/ice/3.8/property-reference/ice-warn-properties/cpp.md)
- [Middleware](https://docs.zeroc.com/ice/3.8/runtime/dispatch/middleware/cpp.md)
