x-samplest-kotlin.1.1.0.source-code.logback.xml Maven / Gradle / Ivy
<configuration> <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"> <resetJUL>true</resetJUL> </contextListener> <property name="LOGS_FOLDER" value="${logs.base:-logs}" /> <appender name="errorFile" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>${LOGS_FOLDER}/errors.log</File> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>ERROR</level> </filter> <encoder> <pattern>%d [%-16thread] [%-10X{principal}] %-5level %logger{36} - %msg%n</pattern> </encoder> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${LOGS_FOLDER}/errors.%d.log</fileNamePattern> <maxHistory>30</maxHistory> </rollingPolicy> </appender> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d [%-16thread] [%-10X{principal}] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <appender name="appLog" class="ch.qos.logback.core.FileAppender"> <File>${LOGS_FOLDER}/app.log</File> <encoder> <pattern>%d [%-16thread] [%-10X{principal}] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <!-- clean up container logs --> <logger name="org.eclipse.jetty.server.AbstractConnector" level="WARN" /> <logger name="org.eclipse.jetty.server.handler.ContextHandler" level="WARN" /> <logger name="org.eclipse.jetty.webapp.StandardDescriptorProcessor" level="WARN" /> <logger name="org.hibernate.validator.internal.engine.ConfigurationImpl" level="WARN" /> <logger name="org.reflections.Reflections" level="WARN" /> <logger name="restx.factory.Factory" level="WARN" /> <!-- app logs --> <logger name="samplest" level="DEBUG" /> <root level="INFO"> <appender-ref ref="STDOUT" /> <appender-ref ref="appLog" /> <appender-ref ref="errorFile" /> </root> </configuration>