EN · DE · RU · FR · ES

#338: logback-spring.xml

projectforge-application/src/main/resources/logback-spring.xml Type: XML Configuration · Source: projectforge-application/src/main/resources/logback-spring.xml 87 lines · 62 code · 14 comments · 11 blank
Wicket XML Configuration for the ProjectForge application.

Content

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
    <property name="LOG_HOME" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}"/>
    <include resource="org/springframework/boot/logging/logback/console-appender.xml"/>

    <appender name="ROLLING-FILE-ALL"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${FILE_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_HOME}/ProjectForge.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <fileNamePattern>${LOG_HOME}/ProjectForge.%d{yyyy-MM-dd}.log.gz</fileNamePattern>
        </rollingPolicy>
    </appender>

    <appender name="ROLLING-ACCESS-LOG"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${FILE_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_HOME}/access.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <fileNamePattern>${LOG_HOME}/access.%d{yyyy-MM-dd}.log.gz</fileNamePattern>
        </rollingPolicy>
    </appender>

    <appender name="ROLLING-SECURITY-LOG"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <encoder>
            <pattern>${FILE_LOG_PATTERN}</pattern>
        </encoder>
        <file>${LOG_HOME}/security.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <fileNamePattern>${LOG_HOME}/security.%d{yyyy-MM-dd}.log.gz</fileNamePattern>
        </rollingPolicy>
    </appender>

    <appender name="MEMORY" class="org.projectforge.common.logging.LoggerMemoryAppender"/>

    <logger name="de.micromata.projectforge.accessLog" level="INFO" additivity="false">
        <!-- additivity="false": do the access log only here, not in the root logger. -->
        <appender-ref ref="ROLLING-ACCESS-LOG"/>
    </logger>

    <logger name="de.micromata.projectforge.securityLog" level="INFO" additivity="false">
        <!-- additivity="false": do the security log only here, not in the root logger. -->
        <appender-ref ref="ROLLING-SECURITY-LOG"/>
    </logger>

    <root level="INFO">
        <appender-ref ref="CONSOLE"/>
        <appender-ref ref="ROLLING-FILE-ALL"/>
  

Git History

a73905c14 Fix typos in projectforge*/ directories Found via codespell See c3b0602a893
0e69d3e75 Visitorbook: minor bug fixes.
f570f0e53 Migration stuff in progress... (all tests of all packages: OK).
1e8b61f8e Migration stuff in progress... dynamicLayout.layoutBelowActions (below action buttons in edit pages).
b0efaddc2 Migration stuff in progress... (all tests of all packages: OK).
3aeda5ef5 Big change: all save|update|...InTrans renamed (InTrans removed). PfPesistenceContext as param not needed anymore (ThreadLocal is used instead). (all tests of all packages: OK).
4efcbd0fb Migration stuff in progress...
3f52990a7 SecurityLogging introduduced (enhances accessLog). Now, access.log AND security.log will be written. security.log contains all failed logins (login form, rest services, carddav etc.) as well as suspicious web requests. Useful for fraud detected and tools such as fail2ban.
77d22d685 Security: LoggingFilter logs now suspicious urls at default in logs/access.log (using Rolling file appender).
577ae82a6 LogViewer and LoggerMemoryAppender prepared.
46d3490b8 logBack configuration adapted to new spring boot version.
2adcb8ba0 Docker: plugins are now also fully supported.
29bb22d5e BuchungssatzExcelImporter uses now Merlin as Excel library.
b7cef299a logback-spring.xml: Ignore warn message from wicket.localizer.
ee2a65a5f logback-spring: logging.pattern.file defined now in application.properties (ip logging should be enabled, now).
96c371a42 logback-spring.xml: debug re