---
title: "Service Logging Considerations"
url: https://docs.zeroc.com/ice/3.8/background-servers/service-logging-considerations
docs_index: https://docs.zeroc.com/llms.txt
---

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

# Service Logging Considerations

## Default Logging

An Ice service running as a Windows service logs to the Windows event log by default. The event source is the service's name unless you set [Ice.EventLog.Source](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties.md#ice.eventlog.source). The [Ice service installer](https://docs.zeroc.com/ice/3.8/background-servers/windows-services/using-the-ice-service-installer.md) registers this source in the `Application` log unless you set its `EventLog` property.

On Linux and macOS, an Ice service logs to standard error by default. A service managed by systemd or launchd runs in the foreground: systemd collects this output in its journal, and launchd writes it to the file named by the `StandardErrorPath` key of the job's property list, or discards it when this key is not set. To send the log messages elsewhere:

- Set [Ice.StdErr](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties.md#ice.stderr) or [Ice.LogFile](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties.md#ice.logfile) to write them to a file.
- Set [Ice.UseSyslog](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties.md#ice.usesyslog) to `1` to send them to `syslog`.
- Set [Ice.UseSystemdJournal](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties.md#ice.usesystemdjournal) to `1` on Linux, or [Ice.UseOSLog](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties.md#ice.useoslog) to `1` on macOS, to send them to the system log.

A service started with [`--daemon`](https://docs.zeroc.com/ice/3.8/background-servers/command-line-options.md#linux-and-macos-daemons) discards standard error unless `Ice.StdErr` is set or `--noclose` is passed.

## Startup Errors

An Ice service creates the logger that its configuration selects when it initializes its communicator. It reports errors that occur before then to standard error on Linux and macOS, and on Windows when it runs without [`--service`](https://docs.zeroc.com/ice/3.8/background-servers/command-line-options.md#windows-services).

A Windows service reports these errors to the event log, except an error reading its configuration file: the service reads this file before it opens the event log, so this error goes to standard error.
