-
-
Notifications
You must be signed in to change notification settings - Fork 72
Advanced Configuration
This guide explains how to fine-tune the Servy ecosystem, from application refresh rates to advanced log rotation strategies.
- File Locations & Prerequisites
- Logging Configuration
- Settings Reference
- Build Configuration Examples
- See Also
-
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.
| 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 |
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\
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. |
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; setUseLocalTimeForRotation: trueto 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; setUseLocalTimeForRotation: trueto use local time. -
Monthly: Rotates on the first day of every calendar month. Defaults to UTC; setUseLocalTimeForRotation: trueto use local time. -
None: (Default) Files only rotate when they hit the size limit.
-
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 to0for 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.
-
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.
-
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 forstdout/stderrupdates 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).
-
Note: To prevent SCM contention, the actual parallelism is capped by:
-
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.
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
}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>Copyright © Akram El Assas. All rights reserved.
- Home
- Overview
- Installation Guide
- Advanced Configuration
- Usage
- Servy Desktop App
- Servy Manager
- Servy CLI
- PowerShell Module
- Examples & Recipes
- Logging & Log Rotation
- Health Monitoring & Recovery
- Environment Variables
- Service Dependencies
- Pre-Launch & Post-Launch Actions
- Pre-Stop & Post-Stop Actions
- Shutdown & Teardown
- Export/Import Services
- Automation & CI/CD
- Integration with Monitoring Tools
- Service Event Notifications
- Comparison with Alternatives
- Security
- Architecture
- Building from Source
- Troubleshooting
- FAQ