All Downloads are FREE. Search and download functionalities are using the official Maven repository.

long.manager-web.1.13.0.source-code.log4j2.xml Maven / Gradle / Ivy

The newest version!
<?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 status="WARN" monitorInterval="30" packages="org.apache.inlong.manager.web.config">
    <properties>
        <property name="basePath">logs</property>
        <property name="log_pattern">[%X{trace_id} %X{span_id}] %d{yyyy-MM-dd HH:mm:ss.SSS} -%5p [%5.30t] %-30.30C{1.}:%L - %mask %n</property>
        <property name="every_file_date">1</property>
        <property name="every_file_size">1G</property>
        <property name="rolling_max">50</property>
        <property name="all_fileName">${basePath}/manager-all.log</property>
        <property name="all_filePattern">${basePath}/info-%d{yyyy-MM-dd}-%i.log.gz</property>
        <property name="all_max">10</property>
        <property name="warn_fileName">${basePath}/warn.log</property>
        <property name="warn_filePattern">${basePath}/warn-%d{yyyy-MM-dd}-%i.log.gz</property>
        <property name="warn_max">10</property>
        <property name="error_fileName">${basePath}/error.log</property>
        <property name="error_filePattern">${basePath}/error-%d{yyyy-MM-dd}-%i.log.gz</property>
        <property name="error_max">10</property>
        <property name="last_modify_time">15d</property>
    </properties>

    <conversionRule conversionWord="clr"
            converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
    <conversionRule conversionWord="wex"
            converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
    <conversionRule conversionWord="wEx"
            converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>

    <appenders>
        <console name="Console" target="SYSTEM_OUT">
            <ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>
            <PatternLayout pattern="${log_pattern}"/>
        </console>

        <RollingFile name="AllFile" fileName="${all_fileName}" filePattern="${all_filePattern}">
            <PatternLayout pattern="${log_pattern}"/>
            <Policies>
                <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
                <SizeBasedTriggeringPolicy size="${every_file_size}"/>
            </Policies>
            <DefaultRolloverStrategy max="${all_max}">
                <Delete basePath="${basePath}" maxDepth="1">
                    <IfFileName glob="info*.log.gz"/>
                    <IfLastModified age="${last_modify_time}"/>
                </Delete>
            </DefaultRolloverStrategy>
            <Filters>
                <ThresholdFilter level="DEBUG" onMatch="ACCEPT" onMismatch="DENY"/>
            </Filters>
        </RollingFile>

        <RollingFile name="WarnFile" fileName="${warn_fileName}" filePattern="${warn_filePattern}">
            <PatternLayout pattern="${log_pattern}"/>
            <Policies>
                <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
                <SizeBasedTriggeringPolicy size="${every_file_size}"/>
            </Policies>
            <DefaultRolloverStrategy max="${warn_max}">
                <Delete basePath="${basePath}" maxDepth="1">
                    <IfFileName glob="warn*.log.gz"/>
                    <IfLastModified age="${last_modify_time}"/>
                </Delete>
            </DefaultRolloverStrategy>
            <Filters>
                <ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="NEUTRAL"/>
                <ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY"/>
            </Filters>
        </RollingFile>

        <RollingFile name="ErrorFile" fileName="${error_fileName}" filePattern="${error_filePattern}">
            <PatternLayout pattern="${log_pattern}"/>
            <Policies>
                <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
                <SizeBasedTriggeringPolicy size="${every_file_size}"/>
            </Policies>
            <DefaultRolloverStrategy max="${error_max}">
                <Delete basePath="${basePath}" maxDepth="1">
                    <IfFileName glob="error*.log.gz"/>
                    <IfLastModified age="${last_modify_time}"/>
                </Delete>
            </DefaultRolloverStrategy>
            <Filters>
                <ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
            </Filters>
        </RollingFile>
    </appenders>

    <loggers>
        <logger name="org.apache.pulsar" level="info" additivity="false"/>
        <logger name="org.apache.zookeeper" level="info" additivity="false"/>
        <root level="ALL">
            <appender-ref ref="Console"/>
            <appender-ref ref="AllFile"/>
            <appender-ref ref="WarnFile"/>
            <appender-ref ref="ErrorFile"/>
        </root>
    </loggers>
</configuration>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy