Expand my Community achievements bar.

SOLVED

How to move request.log logs into custom log file

Avatar

Level 1

Hi Team,

 

I have a requirement where my project custom log file should fetch aem logs/request.log, basically override request.log and store into my custom log file

Same for error.log as well (custom error log should fetch only core (java errors).

kind of urgent requirement.


Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 3

Ankan_Ghosh_0-1689842212983.png

 

Ankan_Ghosh_2-1689842630020.png

Try changing these configurations according to your need. This should work. 

View solution in original post

4 Replies

Avatar

Level 3

it's been a while since i setup custom log file for a specific request i think I did this in configMgr. Look for "Apache Sling Logging Logger Configuration" to specify the custom file and log level. 

Avatar

Community Advisor
  1. Access the AEM Web Console: Log in to your AEM instance as an administrator and navigate to the AEM Web Console. The URL should be: http://localhost:4502/system/console/configMgr

  2. Find the Apache Sling Request Logger: In the Web Console, search for the "Apache Sling Request Logger" configuration by typing "Apache Sling Request Logger" in the search bar.

  3. Edit the Configuration: Select the "Apache Sling Request Logger" configuration from the search results. This configuration allows you to customize request log handling.

  4. Configure Custom Log File: In the configuration, you'll find a property named "Request Log Output." By default, it's set to logs/requests.log. Modify this property to the path of your desired custom log file. For example, set it to /var/logs/my_custom_requests.log

Avatar

Correct answer by
Level 3

Ankan_Ghosh_0-1689842212983.png

 

Ankan_Ghosh_2-1689842630020.png

Try changing these configurations according to your need. This should work.