Class ConsoleAppenderConfig
- java.lang.Object
-
- org.arakhne.afc.bootique.log4j.configs.AppenderConfig
-
- org.arakhne.afc.bootique.log4j.configs.ConsoleAppenderConfig
-
- All Implemented Interfaces:
io.bootique.config.PolymorphicConfiguration
public class ConsoleAppenderConfig extends AppenderConfig
Configuration for a console-based 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 ConsoleAppenderConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.log4j.AppendercreateAppender(String defaultLogFormat)Create an appender with the current configuration.StringgetEncoding()Replies the console encoding.booleangetImmediateFlush()Replies if the text is flushed as soon as it it given to the logger.ConsoleTargetgetTarget()Replies the console target.LevelgetThreshold()Replies if the text is flushed as soon as it it given to the logger.voidsetEncoding(String encoding)Change the console encoding.voidsetImmediateFlush(boolean flush)Change if the text is flushed as soon as it it given to the logger.voidsetTarget(ConsoleTarget target)Change the console target.voidsetThreshold(Level threshold)Set the threshold level.-
Methods inherited from class org.arakhne.afc.bootique.log4j.configs.AppenderConfig
createLayout, getLayout, getLogFormat, setLayout, setLogFormat
-
-
-
-
Method Detail
-
getTarget
public ConsoleTarget getTarget()
Replies the console target.- Returns:
- the target.
-
setTarget
public void setTarget(ConsoleTarget target)
Change the console target.- Parameters:
target- the target.
-
getEncoding
public String getEncoding()
Replies the console encoding.- Returns:
- the encoding.
-
setEncoding
public void setEncoding(String encoding)
Change the console encoding.- Parameters:
encoding- the console encoding.
-
getImmediateFlush
public boolean getImmediateFlush()
Replies if the text is flushed as soon as it it given to the logger.- Returns:
truefor immediate flushing.
-
setImmediateFlush
public void setImmediateFlush(boolean flush)
Change if the text is flushed as soon as it it given to the logger.- Parameters:
flush-truefor immediate flushing.
-
getThreshold
public Level getThreshold()
Replies if the text is flushed as soon as it it given to the logger.- Returns:
truefor immediate flushing.
-
setThreshold
public void setThreshold(Level threshold)
Set the threshold level. All log events with lower level than the threshold level are ignored by the appender.- Parameters:
threshold- the threshold level.
-
createAppender
public org.apache.log4j.Appender createAppender(String defaultLogFormat)
Description copied from class:AppenderConfigCreate an appender with the current configuration.- Specified by:
createAppenderin classAppenderConfig- Parameters:
defaultLogFormat- the default log format.- Returns:
- the appender.
-
-