Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

RequestLoggerService.xml is not taken into account by AEM

dianar23684329
Level 1
Level 1

Hi,

I am working on AEM 6.1SP2. I need to customize the logs and avoid any Get request params being visible in the logs. I followed a few sources on the web on how to customize the logs format. I've created under apps/myapp/config a file called org.apache.sling.engine.impl.log.RequestLoggerService.xml and inside I have the following:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
   jcr:primaryType="sling:OsgiConfig"
   request.log.output="logs/request_1.log"
   request.log.outputtype="Logger Name"
   request.log.service.format="%t [%R] -> %m %H"/>

In aem, I can see the configuration under http://localhost:4502/system/console/services :

Screen Shot 2019-05-30 at 2.49.35 PM.png

However my log format is still the default one.

Any idea why is that happening and how can I fix that?

Thank you in advance!

0 Replies