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