Logging
The Connect2id server uses the popular Log4j 2 framework to handle logging.
Key features:
- Automatic reconfiguration on the fly
- High-performance (5 - 10 times gain) with asynchronous output.
The Log4j configuration file is located in the WEB-INF
directory of the web
application:
WEB-INF/log4j.xml
Please, refer to the Log4j manual for how to edit the configuration file.
The default Log4j configuration file that ships with the Connect2id server looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="error" name="C2idServer" packages="">
<Appenders>
<!-- Log file location uses Tomcat system variable, change for other web servers -->
<RollingFile name="RollingFile"
fileName="${sys:catalina.home}/logs/c2id-server.log"
filePattern="${sys:catalina.home}/logs/c2id-server-%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout>
<Pattern>%d{ISO8601} %p %t %c{1} - %m%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="debug">
<AppenderRef ref="RollingFile"/>
</Root>
</Loggers>
</Configuration>