private bool CanAdd(LogViewModel log) { if (!string.IsNullOrWhiteSpace(LoggerFilter) && !log.Logger.ToUpper().Contains(LoggerFilter.ToUpper())) { return(false); } if (!string.IsNullOrWhiteSpace(MessageFilter) && !log.Message.ToUpper().Contains(MessageFilter.ToUpper())) { return(false); } if (string.Equals(log.LogLevel, LogLevel.Debug.ToString(), StringComparison.CurrentCultureIgnoreCase)) { return(Debug); } if (string.Equals(log.LogLevel, LogLevel.Info.ToString(), StringComparison.CurrentCultureIgnoreCase)) { return(Info); } if (string.Equals(log.LogLevel, LogLevel.Warn.ToString(), StringComparison.CurrentCultureIgnoreCase)) { return(Warning); } return(Error); }