<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
    <Appenders>
        <JDBC name="JDBCAppender" tableName="logs">
            <ConnectionFactory class="com.baeldung.logging.log4j2.tests.jdbc.ConnectionFactory"
                               method="getConnection"/>
            <Column name="when" isEventTimestamp="true"/>
            <Column name="logger" pattern="%logger"/>
            <Column name="level" pattern="%level"/>
            <Column name="message" pattern="%message"/>
            <Column name="throwable" pattern="%ex{full}"/>
        </JDBC>
    </Appenders>
    <Loggers>
        <Root level="trace">
            <AppenderRef ref="JDBCAppender"/>
        </Root>
    </Loggers>
</Configuration>
