Пример #1
0
 public void Emit(LogEvent logEvent)
 {
     // This is a lagging indicator, but the network bandwidth usage benefits
     // are worth the ambiguity.
     if (_shipper.IsIncluded(logEvent))
     {
         _sink.Emit(logEvent);
     }
 }
        public void Emit(LogEvent logEvent)
        {
            // This is a lagging indicator, but the network bandwidth usage benefits
            // are worth the ambiguity.
            var minimumAcceptedLevel = _shipper.MinimumAcceptedLevel;

            if (minimumAcceptedLevel == null ||
                (int)minimumAcceptedLevel <= (int)logEvent.Level)
            {
                _sink.Emit(logEvent);
            }
        }
Пример #3
0
 /// <summary>
 /// Emit the provided log event to the sink.
 /// </summary>
 public void Emit(LogEvent logEvent)
 {
     sink.Emit(logEvent);
 }
Пример #4
0
 public void Emit(LogEvent logEvent)
 {
     _sink.Emit(logEvent);
     _shipper.Emit();
 }