Exemple #1
0
 public SyslogEntry(Facility facility, Severity severity, DateTime?timestamp = null, string hostName = null,
                    string appName = null, string procId = null, string msgId = null, string message = null)
 {
     PayloadType = PayloadType.Rfc5424;
     Facility    = facility;
     Severity    = severity;
     timestamp   = timestamp ?? DateTime.UtcNow;
     Header      = new SyslogHeader()
     {
         Timestamp = timestamp, HostName = hostName,
         AppName   = appName, ProcId = procId, MsgId = msgId //Version should always be 1
     };
     Message = message;
 }
Exemple #2
0
 public SyslogEntry()
 {
     Header = new SyslogHeader();
 }