New: Instance Name used for Syslog

pull/1683/head
Robin Dadswell 3 years ago committed by Qstick
parent 21538b972d
commit 9cff8f31e9

@ -218,7 +218,7 @@ namespace NzbDrone.Core.Configuration
public int SyslogPort => GetValueInt("SyslogPort", 514, persist: false);
public string SyslogLevel => GetValue("SyslogLevel", LogLevel).ToLowerInvariant();
public string SyslogLevel => GetValue("SyslogLevel", LogLevel, false).ToLowerInvariant();
public int GetValueInt(string key, int defaultValue, bool persist = true)
{

@ -44,7 +44,8 @@ namespace NzbDrone.Core.Instrumentation
if (_configFileProvider.SyslogServer.IsNotNullOrWhiteSpace())
{
SetSyslogParameters(_configFileProvider.SyslogServer, _configFileProvider.SyslogPort, minimumLogLevel);
var syslogLevel = LogLevel.FromString(_configFileProvider.SyslogLevel);
SetSyslogParameters(_configFileProvider.SyslogServer, _configFileProvider.SyslogPort, syslogLevel);
}
var rules = LogManager.Configuration.LoggingRules;
@ -118,7 +119,7 @@ namespace NzbDrone.Core.Instrumentation
syslogTarget.MessageSend.Udp.Server = syslogServer;
syslogTarget.MessageSend.Udp.ReconnectInterval = 500;
syslogTarget.MessageCreation.Rfc = RfcNumber.Rfc5424;
syslogTarget.MessageCreation.Rfc5424.AppName = BuildInfo.AppName;
syslogTarget.MessageCreation.Rfc5424.AppName = _configFileProvider.InstanceName;
var loggingRule = new LoggingRule("*", minimumLogLevel, syslogTarget);

Loading…
Cancel
Save