Class AppenderConfig
- java.lang.Object
-
- org.arakhne.afc.bootique.log4j.configs.AppenderConfig
-
- All Implemented Interfaces:
io.bootique.config.PolymorphicConfiguration
- Direct Known Subclasses:
ConsoleAppenderConfig
,FileAppenderConfig
public abstract class AppenderConfig extends Object implements io.bootique.config.PolymorphicConfiguration
Configuration for log4j appenders.- Since:
- 15.0
- Version:
- 17.0 2020-01-04 14:41:57
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.bootique
- Maven Artifact Id:
- bootique-log4j
-
-
Constructor Summary
Constructors Constructor Description AppenderConfig()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.apache.log4j.Appender
createAppender(String defaultLogFormat)
Create an appender with the current configuration.protected org.apache.log4j.Layout
createLayout(String defaultLogFormat)
Create a layout from this appender configuration.LayoutType
getLayout()
Replies the type of layout that should be used by this appender.String
getLogFormat()
Replies the format of the log.void
setLayout(LayoutType type)
Change the type of layout that should be used by this appender.void
setLogFormat(String format)
Change the format of the log.
-
-
-
Method Detail
-
getLogFormat
public String getLogFormat()
Replies the format of the log.- Returns:
- the format, or
null
if no format was specified.
-
setLogFormat
public void setLogFormat(String format)
Change the format of the log.- Parameters:
format
- the format.
-
getLayout
public LayoutType getLayout()
Replies the type of layout that should be used by this appender. Default isLayoutType.PATTERN
.- Returns:
- the type of layout.
-
setLayout
public void setLayout(LayoutType type)
Change the type of layout that should be used by this appender.- Parameters:
type
- the type of the layout.
-
createAppender
public abstract org.apache.log4j.Appender createAppender(String defaultLogFormat)
Create an appender with the current configuration.- Parameters:
defaultLogFormat
- the default log format.- Returns:
- the appender.
-
createLayout
protected org.apache.log4j.Layout createLayout(String defaultLogFormat)
Create a layout from this appender configuration.- Parameters:
defaultLogFormat
- the default log format.- Returns:
- the layout.
-
-