Skip to content

Advanced Configuration

Akram El Assas edited this page Jun 13, 2026 · 41 revisions

This guide explains how to fine-tune the Servy ecosystem, from application refresh rates to advanced log rotation strategies.

Table of Contents

  1. File Locations & Prerequisites
  2. Logging Configuration
  3. Settings Reference
    1. General Logging
    2. Servy Windows Service
    3. Manager App Settings
  4. Build Configuration Examples
  5. See Also

File Locations & Prerequisites

Prerequisites

  • Administrator Privileges: You must run your text editor (e.g., VS Code, Notepad++) as an Administrator to save changes to %ProgramFiles% or %ProgramData%.
  • Restart Required: Changes to configuration files do not take effect dynamically. You must restart the associated application (Desktop/Manager) or the Windows Service (via SCM or CLI) for changes to apply.

Where to Find Settings

Component Modern Build (.NET 10+) Legacy Build (.NET 4.8)
Desktop App %ProgramFiles%\Servy\appsettings.json ...\Servy.exe.config
CLI %ProgramFiles%\Servy\appsettings.cli.json ...\Servy.CLI.exe.config
Manager App %ProgramFiles%\Servy\appsettings.manager.json ...\Servy.Manager.exe.config
Windows Service %ProgramData%\Servy\appsettings.json ...\Servy.Service.Net48.exe.config
Restarter %ProgramData%\Servy\appsettings.restarter.json ...\Servy.Restarter.Net48.exe.config

Logging Configuration

Servy uses a dual-channel logging engine that writes to both the Windows Event Log (for high-level monitoring) and local flat files (for detailed diagnostics).

Log Directory: %ProgramData%\Servy\logs\

Logging Levels (LogLevel)

Determines output verbosity. Values are case-insensitive.

Level Target Description
DEBUG File Only Most verbose; logs internal state and heartbeats. Not recommended for production.
INFO Both (Default) Logs major milestones (starts, stops, configuration changes).
WARN Both Logs non-fatal issues like slow shutdowns or configuration typos.
ERROR Both Logs critical failures, crashes, or access denied errors.
NONE None Disables the logging engine entirely.

Log Rolling Interval (LogRollingInterval)

Determines how often a new log file is created. Available from Servy v7.8+.

Important

Size Rotation Precedence: The LogRotationSizeMB limit always takes precedence. If a log reaches the size limit (e.g., 10MB) before the time interval (e.g., Monthly), it will rotate immediately to prevent disk overflow.

  • Daily: Rotates at the start of each new calendar day. Defaults to UTC; set UseLocalTimeForRotation: true to rotate at midnight in the server's local time.
  • Weekly: Rotates once per calendar week (ISO 8601, FirstFourDayWeek, Monday as the first day). Defaults to UTC; set UseLocalTimeForRotation: true to use local time.
  • Monthly: Rotates on the first day of every calendar month. Defaults to UTC; set UseLocalTimeForRotation: true to use local time.
  • None: (Default) Files only rotate when they hit the size limit.

Settings Reference

General Logging

  • LogLevel: (Default: INFO) Verbosity of the output.
  • LogRotationSizeMB: (Default: 10) Max size in MB before a file is archived.
  • MaxBackupLogFiles: (Default: 10) Number of archived logs to retain. Set to 0 for unlimited.
  • EnableEventLog: (true/false) Mirrors logs to the Windows Event Log.
  • UseLocalTimeForRotation: (true/false) Use local system time instead of UTC when determining date-based log rotation boundaries (Default: false/UTC).

Note

The EnableEventLog setting is primarily respected by the Servy Windows Service wrapper and Servy Windows Service Restarter utility. Setting this in the CLI Desktop App or Manager App configuration has no effect.

Servy Windows Service

  • Timing:WaitChunkMs: (Default: 5000) The interval in milliseconds at which the launcher checks process health and invokes heartbeats.
  • Timing:ScmAdditionalTimeMs: (Default: 15000) Buffer time in milliseconds added to Service Control Manager (SCM) operations to prevent premature timeouts.

Manager App Settings

  • RefreshIntervalInSeconds: (Default: 4) Heartbeat interval in seconds for the main service list. Bounded to [1, 3600].
  • PerformanceRefreshIntervalInMs: (Default: 800) Frequency in milliseconds of CPU/RAM graph updates. Bounded to [100, 300,000].
  • ConsoleRefreshIntervalInMs: (Default: 800) Polling rate in milliseconds for stdout/stderr updates in Console tab. Bounded to [100, 300,000].
  • ConsoleMaxLines: (Default: 20000) Maximum number of stdout/stderr lines retained in the Console tab buffer. Bounded to [100, 2 × default].
  • DependenciesRefreshIntervalInMs: (Default: 800) Polling rate in milliseconds for the Dependencies tab. Bounded to [100, 300,000].
  • MaxBulkOperationParallelism: (Default: 8) Max concurrent SCM operations during bulk tasks.
    • Note: To prevent SCM contention, the actual parallelism is capped by: Math.Min(Environment.ProcessorCount * 2, MaxBulkOperationParallelism).
  • SearchDebounceDelayMs: (Default: 300) Debounce window in milliseconds before the search box re-runs the filter in Console tab. Bounded to [100, 2,000].
  • LogsWindowDays: (Default: 3) Number of days of Windows Event Log history shown in the Logs tab. Bounded to [1, 30].
  • DesktopAppPublishPath: (Default: .\Servy.exe) Path to the Servy desktop app launched from the Manager. Resolved relative to the Manager's base directory if not absolute.

Build Configuration Examples

Modern Build (.NET 10.0+)

File: %ProgramData%\Servy\appsettings.json (Servy Windows Service Wrapper)

{
  "Timing": {
    "WaitChunkMs": 5000,
    "ScmAdditionalTimeMs": 15000
  },
  "LogLevel": "INFO",
  "EnableEventLog": true,
  "LogRotationSizeMB": 10,
  "LogRollingInterval": "Daily",
  "MaxBackupLogFiles": 10,
  "UseLocalTimeForRotation": true
}

Legacy Build (.NET Framework 4.8)

File: %ProgramData%\Servy\Servy.Service.Net48.exe.config (Servy Windows Service Wrapper)

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="Timing:WaitChunkMs" value="5000" />
    <add key="Timing:ScmAdditionalTimeMs" value="15000" />
    <add key="LogLevel" value="INFO" />
    <add key="EnableEventLog" value="true" />
    <add key="LogRotationSizeMB" value="10" />
    <add key="LogRollingInterval" value="Daily" />
    <add key="MaxBackupLogFiles" value="10" />
    <add key="UseLocalTimeForRotation" value="true" />
  </appSettings>
</configuration>

See Also

Clone this wiki locally