Beispiel #1
0
 public Rfc5424(Facility facility, Rfc5424Config rfc5424Config, EnforcementConfig enforcementConfig) : base(facility, enforcementConfig)
 {
     version           = rfc5424Config.Version;
     hostnameLayout    = rfc5424Config.Hostname;
     appNameLayout     = rfc5424Config.AppName;
     procIdLayout      = rfc5424Config.ProcId;
     msgIdLayout       = rfc5424Config.MsgId;
     structuredData    = new StructuredData(rfc5424Config.StructuredData, enforcementConfig);
     disableBom        = rfc5424Config.DisableBom;
     hostnamePolicySet = new FqdnHostnamePolicySet(enforcementConfig, rfc5424Config.DefaultHostname);
     appNamePolicySet  = new AppNamePolicySet(enforcementConfig, rfc5424Config.DefaultAppName);
     procIdPolicySet   = new ProcIdPolicySet(enforcementConfig);
     msgIdPolicySet    = new MsgIdPolicySet(enforcementConfig);
     utf8MessagePolicy = new Utf8MessagePolicy(enforcementConfig);
 }
Beispiel #2
0
 public Rfc5424(Facility facility, LogLevelSeverityConfig logLevelSeverityConfig, Rfc5424Config rfc5424Config, EnforcementConfig enforcementConfig) : base(facility, logLevelSeverityConfig, enforcementConfig)
 {
     version           = rfc5424Config.Version;
     hostnameLayout    = rfc5424Config.Hostname;
     appNameLayout     = rfc5424Config.AppName;
     procIdLayout      = rfc5424Config.ProcId;
     msgIdLayout       = rfc5424Config.MsgId;
     structuredData    = new StructuredData(rfc5424Config.StructuredData, enforcementConfig);
     preamble          = rfc5424Config.DisableBom ? new byte[0] : Encoding.UTF8.GetPreamble();
     hostnamePolicySet = new FqdnHostnamePolicySet(enforcementConfig, rfc5424Config.DefaultHostname);
     appNamePolicySet  = new AppNamePolicySet(enforcementConfig, rfc5424Config.DefaultAppName);
     procIdPolicySet   = new ProcIdPolicySet(enforcementConfig);
     msgIdPolicySet    = new MsgIdPolicySet(enforcementConfig);
     utf8MessagePolicy = new Utf8MessagePolicy(enforcementConfig);
 }