Package com.axelor.common.logging
Class LoggerConfiguration
- java.lang.Object
-
- com.axelor.common.logging.LoggerConfiguration
-
public class LoggerConfiguration extends Object
The logger configuration builder using logback-classic.It can be configured with following properties:
- logging.config - the path to custom logback config file
- logging.path - the directory where log files are saved
- logging.pattern.file - the logging pattern for file appender
- logging.pattern.console - the logging pattern for console appender
- logging.level.root - the logging level of root logger
- logging.level.com.axelor - the logging level of given logger
If logging.config is given, all other properties will be ignored.
If logging.path is not given, file appender will be disabled
If logging.pattern.file is set toOFF
, file appender will be disabled
If logging.pattern.console is set toOFF
, console appender will be disabled
If logback.xml is found in classpath andskipDefaultConfig
is false, no custom configuration is done.The logging pattern can use
%clr()
to highlight based on log level, or%clr(){color}
withfaint, red, green, yellow, blue, magenta, cyan
as color to style the log message on console output.
-
-
Constructor Summary
Constructors Constructor Description LoggerConfiguration(Properties config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
conversionRule(String word, Class<? extends ch.qos.logback.core.pattern.Converter<?>> converter)
void
install()
void
skipDefaultConfig(boolean skipDefaultConfig)
void
uninstall()
-
-
-
Constructor Detail
-
LoggerConfiguration
public LoggerConfiguration(Properties config)
-
-