Configure Log4j for Audit logs
For JBoss AS 7 and EAP6, the following can be edited in JBOSS_HOME/standalone/configuration/standalone.xml:
<subsystem xmlns="urn:jboss:domain:logging:1.2">
...
<periodic-rotating-file-handler name="SignServer" autoflush="true">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="signserver.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<periodic-rotating-file-handler name="SignServer_audit" autoflush="true">
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="signserver_audit.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
<logger category="org.signserver">
<level name="DEBUG"/>
<handlers>
<handler name="SignServer"/>
</handlers>
</logger>
<logger category="org.ejbca">
<level name="DEBUG"/>
<handlers>
<handler name="SignServer"/>
</handlers>
</logger>
<logger category="org.cesecore">
<level name="DEBUG"/>
<handlers>
<handler name="SignServer"/>
</handlers>
</logger>
<logger category="org.signserver.server.log.SignServerLog4jDevice">
<handlers>
<handler name="SignServer_audit"/>
</handlers>
</logger>
...
</subsystem>
For GlassFish a similar setup is already configured in SIGNSERVER_HOME/modules/SignServer-Module-Log4j/src/log4j.properties.