示例#1
0
        public static void Log(SeverityGrades severity, string message, bool saveEntry = true)
        {
            var logEntry = new LogEntry(DateTime.Now, severity, message);

            _logs.Add(logEntry);
            if (saveEntry)
            {
                SaveEntry(logEntry);
            }
        }
示例#2
0
 public LogEntry(DateTime eventTime, SeverityGrades severity, string message)
 {
     _eventTime = eventTime;
     _severity = severity;
     _message = message;
 }