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

lib.logback.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<!--

    ====================
    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright 2013 ConnId. All rights reserved.

    The contents of this file are subject to the terms of the Common Development
    and Distribution License("CDDL") (the "License").  You may not use this file
    except in compliance with the License.

    You can obtain a copy of the License at
    http://opensource.org/licenses/cddl1.php
    See the License for the specific language governing permissions and limitations
    under the License.

    When distributing the Covered Code, include this CDDL Header Notice in each file
    and include the License file at http://opensource.org/licenses/cddl1.php.
    If applicable, add the following below this CDDL Header, with the fields
    enclosed by brackets [] replaced by your own identifying information:
    "Portions Copyrighted [year] [name of copyright owner]"
    ====================

-->
<configuration>

    <property name="SERVER_LEVEL" value="INFO"/>
    <property name="LOGS_FOLDER" value="${CONNECTOR_SERVER_HOME}/logs"/>
    <appender name="SERVER-FILE" class="ch.qos.logback.core.FileAppender">
        <file>logs/ConnectorServer.log</file>
        <append>true</append>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>logs/ConnectorServer-%d{yyyyMMdd}.log</fileNamePattern>
        </rollingPolicy>
        <encoder>
            <pattern>%date [%thread] %-5level %logger{35} - %msg %n</pattern>
        </encoder>
    </appender>
    <appender name="CONNECTOR-FILE" class="ch.qos.logback.core.FileAppender">
        <file>logs/Connector.log</file>
        <append>true</append>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>logs/Connector-%d{yyyyMMdd}.log</fileNamePattern>
        </rollingPolicy>
        <!--rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>${LOGS_FOLDER}/my-application-troubleshooting.%i.log</fileNamePattern>
            <maxIndex>10</maxIndex>
        </rollingPolicy>
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>10MB</maxFileSize>
        </triggeringPolicy-->
        <encoder>
            <pattern>%date [%thread] %-5level %logger{35} - %msg %n</pattern>
        </encoder>
    </appender>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <layout class="ch.qos.logback.classic.PatternLayout">
            <pattern>%date [%thread] %-5level %logger{35} - %msg %n</pattern>
        </layout>
    </appender>

    <!-- additivity=false ensures connectors data only goes to the connector log -->
    <logger name="org.identityconnectors.misc" level="INFO" additivity="false">
        <appender-ref ref="CONNECTOR-FILE"/>
    </logger>
    <logger name="org.identityconnectors.connectors" level="INFO" additivity="false">
        <appender-ref ref="CONNECTOR-FILE"/>
    </logger>

    <logger name="org.identityconnectors.framework" level="${SERVER_LEVEL}" additivity="false">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="SERVER-FILE"/>
    </logger>

    <!--SPI Logger to divide low lever operation info in case of server trace because of high verbosity-->
    <logger name="org.identityconnectors.framework.spi" level="INFO" additivity="false">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="SERVER-FILE"/>
    </logger>

    <!--API Logger to divide low lever operation info in case of server trace because of high verbosity-->
    <logger name="org.identityconnectors.framework.api" level="INFO" additivity="false">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="SERVER-FILE"/>
    </logger>

    <logger name="org.identityconnectors.common" level="${SERVER_LEVEL}" additivity="false">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="SERVER-FILE"/>
    </logger>
    <logger name="org.identityconnectors.contract" level="${SERVER_LEVEL}" additivity="false">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="SERVER-FILE"/>
    </logger>
    <logger name="org.identityconnectors.test" level="${SERVER_LEVEL}" additivity="false">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="SERVER-FILE"/>
    </logger>
    <!-- Legacy connectors -->
    <logger name="org.identityconnectors" level="INFO" additivity="false">
        <appender-ref ref="STDOUT"/>
    </logger>

    <root level="debug">
        <appender-ref ref="STDOUT"/>
    </root>

    <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
        <resetJUL>true</resetJUL>
    </contextListener>
</configuration>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy