ardingsphere.elasticjob.elasticjob-cloud-scheduler.3.0.0-alpha.source-code.logback.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Licensed to the Apache Software Foundation (ASF) under one or more ~ contributor license agreements. See the NOTICE file distributed with ~ this work for additional information regarding copyright ownership. ~ The ASF licenses this file to You under the Apache License, Version 2.0 ~ (the "License"); you may not use this file except in compliance with ~ the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <configuration> <property name="log.directory" value="logs/" /> <property name="log.context.name" value="elasticjob-cloud-scheduler" /> <property name="log.charset" value="UTF-8" /> <property name="log.maxHistory" value="30" /> <property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" /> <property name="log.error.log.level" value="WARN" /> <property name="log.async.queue.size" value="1024" /> <contextName>${log.context.name}</contextName> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder charset="${log.charset}"> <pattern>${log.pattern}</pattern> </encoder> </appender> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.directory}${log.context.name}-log.%d{yyyy-MM-dd}.log</fileNamePattern> <maxHistory>${log.maxHistory}</maxHistory> </rollingPolicy> <encoder charset="${log.charset}"> <pattern>${log.pattern}</pattern> </encoder> </appender> <!-- Asynchronized log, for FILE only --> <appender name ="ASYNC_FILE" class= "ch.qos.logback.classic.AsyncAppender"> <!-- Don't discard log, logback will discard TRACE, DEBUG, INFO log when queue 80% capacity reached by default. --> <discardingThreshold >0</discardingThreshold> <queueSize>${log.async.queue.size}</queueSize> <appender-ref ref = "FILE"/> </appender> <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>${log.error.log.level}</level> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${log.directory}${log.context.name}-error.%d{yyyy-MM-dd}.log</fileNamePattern> <maxHistory>${log.maxHistory}</maxHistory> </rollingPolicy> <encoder charset="${log.charset}"> <pattern>${log.pattern}</pattern> </encoder> </appender> <root> <level value="INFO" /> <appender-ref ref="STDOUT" /> <appender-ref ref="ASYNC_FILE" /> <appender-ref ref="ERROR" /> </root> <logger name="org.apache.zookeeper" level="WARN" /> <logger name="org.apache.curator" level="WARN" /> </configuration>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy