How to enable EventLog logging for Replication
The Replication Client is configured to log to the Windows Event Viewer *by default* when running on a Windows operating system.
Here is how it works and how you can further configure it:
-
Where to find the logs
- By default, the client writes logs to:
- *Event Viewer* -> *Windows Logs* -> Application
- The *Source* will typically be `SuperOffice Replication Client` (or `.NET Runtime` for low-level crash events).
- This is especially useful when you have installed the client as a background service using the `Replication.Client.exe install` command.
- By default, the client writes logs to:
-
How to configure log levels (Verbosity)
- You can control what gets logged to the Event Viewer by modifying the `Logging` section in your `appsettings.json` file.
- To specifically configure the Event Log separately from the Console output, you can add an `EventLog` section like this:
-
{ "Logging": { "EventLog": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "LogLevel": { "Default": "Information" } }, "ReplicationClient": { // ... rest of your config } } - Default: "Information": Logs general progress, start/stop events, and errors.
- Default: "Warning": Only logs warnings, errors, and critical failures (good for reducing noise).
-