Package com.axelor.common.logging
Class LoggerConfiguration
java.lang.Object
com.axelor.common.logging.LoggerConfiguration
The logger configuration builder using logback-classic.
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 to
If logging.pattern.console is set to
If logback.xml is found in classpath and
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 to
OFF
, file appender will be disabledIf logging.pattern.console is set to
OFF
, console appender will be disabled
If logback.xml is found in classpath and
skipDefaultConfig
is false, no
custom configuration is done.
The logging pattern can use %clr()
to highlight based on log level, or
%clr(){color}
with faint, red, green, yellow, blue, magenta, cyan
as color to
style the log message on console output.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
conversionRule
(String word, Class<? extends ch.qos.logback.core.pattern.Converter<?>> converter) void
install()
void
skipDefaultConfig
(boolean skipDefaultConfig) void
-
Constructor Details
-
LoggerConfiguration
-
-
Method Details
-
skipDefaultConfig
public void skipDefaultConfig(boolean skipDefaultConfig) -
install
public void install() -
uninstall
public void uninstall() -
conversionRule
-