Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. Add a new appender under <Appenders> element with the following content:

Code Block
languagexml
themeRDark
<RollingFile name="AUDIT" fileName="${tomee-log-path}/audit.log" filePattern="${tomee-log-path}/audit.%i.log" append="true" bufferedIO="false" bufferSize="0">
	<PatternLayout> 
		<Pattern>%d{dd/MM/yyyy HH:mm:ss,SSS}- %p %c{1.} [%t] %m %ex%n</Pattern>
	</PatternLayout>
	<Policies>
		<SizeBasedTriggeringPolicy size="5 MB" />
	</Policies>
		<DefaultRolloverStrategy max="10"/>
</RollingFile>

...

2. Add a new logger under <Loggers> element with the following content:For Web Console:

Code Block
theme
languagexmlRDark
<Logger name="org.montier.ui.web.filters.AuditFilter" level="debug" additivity="false">
	<AppenderRef ref="AUDIT"/>
</Logger>

For Admin Console:

Code Block
languagexml
themeRDark
<Logger name="org.montier.utils.admin.common.utils.web.filter.AuditFilterAbstractAuditFilter" level="debug" additivity="false">
	<AppenderRef ref="AUDIT"/>
</Logger>


Make sure to restart 3. Restart the UI/AppAdmin service services after altering the log4j2 configuration filefiles.

The output log file will be created in the logs directory (/logs/ui or /logs/appadmin) with the name audit.log.

...