1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

New: Added UDP syslog support

(cherry picked from commit 8d856b2edb8bf46a2b516d5f7644ae3fa1151323)
This commit is contained in:
Robin Dadswell
2021-09-27 23:30:44 +01:00
committed by Mark McDowall
parent 41a821352e
commit 6c0f22a11e
3 changed files with 38 additions and 2 deletions
@@ -42,6 +42,9 @@ namespace NzbDrone.Core.Configuration
bool UpdateAutomatically { get; }
UpdateMechanism UpdateMechanism { get; }
string UpdateScriptPath { get; }
string SyslogServer { get; }
int SyslogPort { get; }
string SyslogLevel { get; }
}
public class ConfigFileProvider : IConfigFileProvider
@@ -209,7 +212,14 @@ namespace NzbDrone.Core.Configuration
public string UpdateScriptPath => GetValue("UpdateScriptPath", "", false);
public int GetValueInt(string key, int defaultValue)
public string SyslogServer => GetValue("SyslogServer", "", persist: false);
public int SyslogPort => GetValueInt("SyslogPort", 514, persist: false);
public string SyslogLevel => GetValue("SyslogLevel", LogLevel, persist: false).ToLowerInvariant();
public int GetValueInt(string key, int defaultValue, bool persist = true)
{
return Convert.ToInt32(GetValue(key, defaultValue));
}