Package simpleloglib.appenders
Class AppenderFactory
java.lang.Object
simpleloglib.appenders.AppenderFactory
Appender factory for implementations provided by this library.
- Author:
- lunalobos
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Appender
getDefaultInstance
(String name) Retrieves anAppender
that writes to the consolestatic Appender
getFileAppender
(String name, String path) Retrieves anAppender
that writes to a filestatic Appender
getHttpAppender
(String name, String url, String authorization) Experimentalstatic Appender
getJDBCAppender
(String name, JDBCAppenderConfig config) Retrieves anAppender
that persists log events in a relational database
-
Constructor Details
-
AppenderFactory
public AppenderFactory()
-
-
Method Details
-
getDefaultInstance
Retrieves anAppender
that writes to the console- Parameters:
name
-- Returns:
- an instance of
ConsoleAppender
-
getJDBCAppender
Retrieves anAppender
that persists log events in a relational database- Parameters:
name
-config
-- Returns:
- an implementation of
Appender
-
getFileAppender
Retrieves anAppender
that writes to a file- Parameters:
name
-path
-- Returns:
- an implementation of
Appender
-
getHttpAppender
ExperimentalRetrieves 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
-