User tools

Website tools


debug log

Debug log

Logging configuration

The logging of the individual components “benno-archve”, “benno-rest” and “benno-web” is configured in different configuration files.

Archiving and REST interface

The logging of the Java services of Benno MailArchiv is done in the configuration files

  • /etc/benno/archive-log4j.xml
  • /etc/benno/rest-log4j.xml

Example "archive-log4j.xml"

xml version="1.0" encoding="UTF-8"?>
<!-- bennoarchive >= 2.10 log configuration -->
<Configuration>
    <Appenders>
        <Console name="STDERR" target="SYSTEM_OUT">
            <PatternLayout pattern="%-5p %c: %m%n"/>
        </Console>
        <RollingFile name="ArchiveAppender" filePattern="/var/log/benno/rest.log.%d{yyyy-MM-dd}.gz" 
fileName="/var/log/benno/rest.log" append="true">
            <PatternLayout>
                <Pattern>%d{ISO8601} %-5p %m%n</Pattern>
            </PatternLayout>
            <Policies>
                <TimeBasedTriggeringPolicy interval="1"/>
            </Policies>
        </RollingFile>
    </Appenders>
    <Loggers>
        <!-- #################################################################### -->
        <!-- LOGLEVEL: TRACE DEBUG INFO WARN ERROR FATAL -->
        <Root level="INFO">
            <AppenderRef ref="ArchiveAppender"/>
        </Root>
    </Loggers>
</Configuration>

The log information is written to the log files /var/log/benno/archive.log and /var/log/benno/rest.log .

Debug logging

Hierfür wird der Loglevel auf „DEBUG“ gesetzt und anschließend der jeweilige Dienst (benno-archive oder benno-rest) neu gestartet.

    <Loggers>
        <!-- #################################################################### -->
        <!-- LOGLEVEL: TRACE DEBUG INFO WARN ERROR FATAL -->
        <Root level="DEBUG">
            <AppenderRef ref="ArchiveAppender"/>
        </Root>
    </Loggers>
# systemctl restart benno archive

Web interface "benno-web"

The web interface is a web application implemented in PHP. Logging generally occurs in the "error.log" file of the Apache web server.

To enable debug logging for the web interface, the parameter in the file /etc/benno-web/benno.conf is set to a debug level between 1 and 4. Higher debug levels output correspondingly more detailed information.

DEBUG = 1

escaped.

debug-log.txt Last modified: 2023/06/07 14:48 by lwsystems