public override void LogEntry(LogEntry entry)
 {
     if (Filter.Writable(entry))
     {
         InnerLogger.LogEntry(entry);
     }
 }
Пример #2
0
        /// <summary>
        /// 重写 LogEntry 方法,交由内联日志记录器记录
        /// </summary>
        /// <param name="entry">要记录的日志条目</param>
        public override void LogEntry(LogEntry entry)
        {
            if (InnerLogger == null)
            {
                throw new InvalidOperationException();
            }

            try
            {
                InnerLogger.LogEntry(entry);
            }
            catch (Exception e)
            {
                try
                {
                    if (ExceptionLogger != null)
                    {
                        ExceptionLogger.LogException(e);
                    }
                }
                catch { }

                throw;
            }
        }