-
Changes in Version 3.6.2 (2021-01-22)
Changes in Version 3.5.0 (2020-06-04)
Changes in Version 3.4.2 (2020-03-26)
Changes in Version 3.3.1 (2019-08-22)
Changes in Version 3.3.0 (2019-01-09)
Changes in Version 3.2.1 (2018-12-21)
Changes in Version 3.2.0 (2018-08-27)
Changes in Version 3.1.1 (2018-06-29)
Changes in Version 3.1.0 (2018-03-27)
Changes in Version 3.0.0 (2018-02-20)
Logging
tapir uses Log4j2 as logging framework.
Configuration
tapir does not recommend any configuration style. You can configure Log4j2 the way you prefer. Just take a look at https://logging.apache.org/log4j/2.x/manual/configuration.html.
Anyway, if you prefer using a xml file this one is a good starting point. It is generated by our archetype as well:
log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>
What about third-party libraries?
tapir uses bridges to redirect the logging output of logging frameworks which are used by third-party libraries to Log4j2. That has the advantage that you can configure all loggers with a Log4j2 configuration.
We analyzed the logging frameworks which our third-party libraries used and included the corresponding bridges in the tapir-dependencies module. If you add additional frameworks with additional logging frameworks you have to add the bridge by yourself.
The following logging frameworks are bridged out-of-the-box:
- SLF4J
- Apache Commons Logging
- java.util.logging (JUL)
- Previous
- Next