...
Few lines of log should be printed out in your default log:
Further
Log4j2 config
Configure log4j2.xml to direct audit log info to magnolia-audit.log just by adding your aspect class to the log such as this case:
Code Block |
---|
<Logger name="info.magnolia.audit.AuditLogger" level="DEBUG" additivity="true">
<AppenderRef ref="log-audit"/>
</Logger> |
Recommended update for magnolia-audit.log appender to have a nicer output - please change your existing PatternLayout using provided patter here for better log info "%-5p %c %d{dd.MM.yyyy HH:mm:ss} -- %m%n"
Code Block | ||||
---|---|---|---|---|
| ||||
<RollingFile name="sync-log-audit"
fileName="${magnolia.logs.dir}/magnolia-audit.log"
filePattern="${magnolia.logs.dir}/magnolia-audit-%i.log"
append="true">
<PatternLayout pattern="%-5p %c %d{dd.MM.yyyy HH:mm:ss} -- %m%n"/>
<ThresholdFilter level="DEBUG"/>
<Policies>
<SizeBasedTriggeringPolicy size="1MB"/>
</Policies>
<DefaultRolloverStrategy max="5"/>
</RollingFile>
<Async name="log-audit">
<AppenderRef ref="sync-log-audit"/>
</Async> |
Performance warning
Load time weaving will intercept your instance at JVM level. This instrumentation will produce some overhead and has its performance trade-offs. So please just use it to trace your issue then turn it off later. Also this approach has a limitation that you have to restart your running instance to get it work. settings will be provided later. Hope this helps!