Class CountingNoOpAppender

All Implemented Interfaces:
Appender, Filterable, LocationAware, LifeCycle, LifeCycle2

@Plugin(name="CountingNoOp", category="Core", elementType="appender", printObject=true) public class CountingNoOpAppender extends AbstractAppender
No-Operation Appender that counts events.
  • Constructor Details

    • CountingNoOpAppender

      public CountingNoOpAppender(String name, Layout<?> layout)
  • Method Details

    • getCount

      public long getCount()
    • append

      public void append(LogEvent event)
      Description copied from interface: Appender
      Logs a LogEvent using whatever logic this Appender wishes to use. It is typically recommended to use a bridge pattern not only for the benefits from decoupling an Appender from its implementation, but it is also handy for sharing resources which may require some form of locking.
      event - The LogEvent.
    • createAppender

      @PluginFactory public static CountingNoOpAppender createAppender(@PluginAttribute("name") String name)
      Creates a CountingNoOp Appender.