k.devops.ci.worker.worker-common.2.1.3.source-code.logback.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Tencent is pleased to support the open source community by making BK-CI 蓝鲸持续集成平台 available. ~ ~ Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. ~ ~ BK-CI 蓝鲸持续集成平台 is licensed under the MIT license. ~ ~ A copy of the MIT License is included in this file. ~ ~ ~ Terms of the MIT License: ~ ~ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated ~ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ~ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to ~ permit persons to whom the Software is furnished to do so, subject to the following conditions: ~ ~ The above copyright notice and this permission notice shall be included in all copies or substantial portions of ~ the Software. ~ ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT ~ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN ~ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ~ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ~ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> <configuration scan="false" debug="false"> <property name="pattern" value="[%date{dd MMM yyyy;HH:mm:ss.SSS}][%thread] %-5level %logger{36}:%method:%line - %msg%n"/> <contextName>logback</contextName> <!--输出到文件--> <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_PATH:-.}/logs/${AGENT_LOG_PREFIX:-agent}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_PATH:-.}/logs/${AGENT_LOG_PREFIX:-agent}-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <maxFileSize>100MB</maxFileSize> <maxHistory>14</maxHistory> <totalSizeCap>10GB</totalSizeCap> </rollingPolicy> <encoder> <pattern>${pattern}</pattern> <charset>UTF-8</charset> </encoder> </appender> <!--本地备份log--> <appender name="runtime" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${LOG_PATH:-.}/logs/runtime.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_PATH:-.}/logs/runtime-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <maxFileSize>100MB</maxFileSize> <maxHistory>30</maxHistory> <totalSizeCap>10GB</totalSizeCap> </rollingPolicy> <encoder> <pattern>${pattern}</pattern> <charset>UTF-8</charset> </encoder> </appender> <logger name="com.tencent.devops.worker.common.api.log.LogResourceApi" level="INFO" additivity="false"> <appender-ref ref="runtime" /> </logger> <root level="INFO"> <appender-ref ref="file"/> </root> </configuration>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy