ITriggeringEventEvaluator.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #region Apache License
  2. //
  3. // Licensed to the Apache Software Foundation (ASF) under one or more
  4. // contributor license agreements. See the NOTICE file distributed with
  5. // this work for additional information regarding copyright ownership.
  6. // The ASF licenses this file to you under the Apache License, Version 2.0
  7. // (the "License"); you may not use this file except in compliance with
  8. // the License. You may obtain a copy of the License at
  9. //
  10. // http://www.apache.org/licenses/LICENSE-2.0
  11. //
  12. // Unless required by applicable law or agreed to in writing, software
  13. // distributed under the License is distributed on an "AS IS" BASIS,
  14. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. // See the License for the specific language governing permissions and
  16. // limitations under the License.
  17. //
  18. #endregion
  19. using System;
  20. namespace log4net.Core
  21. {
  22. /// <summary>
  23. /// Test if an <see cref="LoggingEvent"/> triggers an action
  24. /// </summary>
  25. /// <remarks>
  26. /// <para>
  27. /// Implementations of this interface allow certain appenders to decide
  28. /// when to perform an appender specific action.
  29. /// </para>
  30. /// <para>
  31. /// The action or behavior triggered is defined by the implementation.
  32. /// </para>
  33. /// </remarks>
  34. /// <author>Nicko Cadell</author>
  35. public interface ITriggeringEventEvaluator
  36. {
  37. /// <summary>
  38. /// Test if this event triggers the action
  39. /// </summary>
  40. /// <param name="loggingEvent">The event to check</param>
  41. /// <returns><c>true</c> if this event triggers the action, otherwise <c>false</c></returns>
  42. /// <remarks>
  43. /// <para>
  44. /// Return <c>true</c> if this event triggers the action
  45. /// </para>
  46. /// </remarks>
  47. bool IsTriggeringEvent(LoggingEvent loggingEvent);
  48. }
  49. }