Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Customizing request.log and access.log files for CQ 5.6.1

Avatar

Level 1

Hi,

Need help for customizing request.log and access.log files for CQ 5.6.1. I need to add Session ID attribute to the log files for some monitoring purpose. Read the documentation for CQ 5.6.1 and its mentioned that customizing these 2 files is possible. But didn't find any details or examples of how to achieve that. Can you please let me know about this?

1 Accepted Solution

Avatar

Correct answer by
Level 10
2 Replies

Avatar

Employee Advisor

Hi,

what do you mean with session ID? Do you want to print the server-side session ID to the logfile? I don't think, that this is not easily possible, as it is not provided as variable in the logger (see the OSGI console for the list of supported data for logging. You likely need to extend the code, but note: AEM 5.6.1 still uses slf4j, while AEM 6.x uses logback as backend.

kind regards,
Jörg

Avatar

Correct answer by
Level 10

For this you need to configure RequestLoggerService &  not logger writer or reader.

http://sling.apache.org/documentation/development/client-request-logging.html#ClientRequestLogging-L....