New: Added UDP syslog support

This commit is contained in:
Robin Dadswell
2021-09-27 23:30:44 +01:00
committed by Qstick
parent e07ad14e83
commit 8d856b2edb
3 changed files with 31 additions and 0 deletions

View File

@@ -45,6 +45,8 @@ namespace NzbDrone.Core.Configuration
bool UpdateAutomatically { get; }
UpdateMechanism UpdateMechanism { get; }
string UpdateScriptPath { get; }
string SyslogServer { get; }
int SyslogPort { get; }
}
public class ConfigFileProvider : IConfigFileProvider
@@ -213,6 +215,9 @@ namespace NzbDrone.Core.Configuration
public string UpdateScriptPath => GetValue("UpdateScriptPath", "", false);
public string SyslogServer => GetValue("SyslogServer", "", persist: false);
public int SyslogPort => GetValueInt("SyslogPort", 514, persist: false);
public int GetValueInt(string key, int defaultValue, bool persist = true)
{
return Convert.ToInt32(GetValue(key, defaultValue, persist));