Class AppenderFactory

java.lang.Object
simpleloglib.appenders.AppenderFactory

public class AppenderFactory extends Object
Appender factory for implementations provided by this library.
Author:
lunalobos
  • Constructor Details

    • AppenderFactory

      public AppenderFactory()
  • Method Details

    • getDefaultInstance

      public static Appender getDefaultInstance(String name)
      Retrieves an Appender that writes to the console
      Parameters:
      name -
      Returns:
      an instance of ConsoleAppender
    • getJDBCAppender

      public static Appender getJDBCAppender(String name, JDBCAppenderConfig config)
      Retrieves an Appender that persists log events in a relational database
      Parameters:
      name -
      config -
      Returns:
      an implementation of Appender
    • getFileAppender

      public static Appender getFileAppender(String name, String path)
      Retrieves an Appender that writes to a file
      Parameters:
      name -
      path -
      Returns:
      an implementation of Appender
    • getHttpAppender

      public static Appender getHttpAppender(String name, String url, String authorization)
      Experimental

      Retrieves an Appender that writes to a web server using HTTP protocol with authentication. Warning: this appender is not tested

      Parameters:
      name -
      url -
      authorization -
      Returns:
      an implementation of Appender