Class HttpAppender

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

@Plugin(name="Http", category="Core", elementType="appender", printObject=true) public final class HttpAppender extends AbstractAppender
Sends log events over HTTP.
  • Method Details

    • newBuilder

      @PluginBuilderFactory public static <B extends HttpAppender.Builder<B>> B newBuilder()
      Returns:
      a builder for a HttpAppender.
    • start

      public void start()
      Description copied from class: AbstractFilterable
      Make the Filter available for use.
      Specified by:
      start in interface LifeCycle
      Overrides:
      start in class AbstractFilterable
    • 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.
      Parameters:
      event - The LogEvent.
    • stop

      public boolean stop(long timeout, TimeUnit timeUnit)
      Description copied from class: AbstractFilterable
      Cleanup the Filter.
      Specified by:
      stop in interface LifeCycle2
      Overrides:
      stop in class AbstractFilterable
      Parameters:
      timeout - the maximum time to wait
      timeUnit - the time unit of the timeout argument
      Returns:
      true if the receiver was stopped cleanly and normally, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractAppender