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.Appender
createAppender(String defaultLogFormat)
Create an appender with the current configuration.String
getEncoding()
Replies the console encoding.boolean
getImmediateFlush()
Replies if the text is flushed as soon as it it given to the logger.ConsoleTarget
getTarget()
Replies the console target.Level
getThreshold()
Replies if the text is flushed as soon as it it given to the logger.void
setEncoding(String encoding)
Change the console encoding.void
setImmediateFlush(boolean flush)
Change if the text is flushed as soon as it it given to the logger.void
setTarget(ConsoleTarget target)
Change the console target.void
setThreshold(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:
true
for 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
-true
for immediate flushing.
-
getThreshold
public Level getThreshold()
Replies if the text is flushed as soon as it it given to the logger.- Returns:
true
for 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:AppenderConfig
Create an appender with the current configuration.- Specified by:
createAppender
in classAppenderConfig
- Parameters:
defaultLogFormat
- the default log format.- Returns:
- the appender.
-
-