Expand my Community achievements bar.

SOLVED

Dispatcher log - Add referrer and IP

Avatar

Level 6

Hi Team,

 

Apache : 2.4-4.3.4

 

AEM: 6.5.12

 

We need  to add referrer and IP in dispacther.log.

 

Default format of Dispatcher.log is as below:

 

[Fri Mar 10 14:18:30 2023] [I] [pid 3808497:tid 140366443443968] "GET /content/dam/mysite/resources/images/ribbon-yellow.svg" - hit [publishfarm/-] 0ms

 

 

 

Problem:

Is there any way to add Referrer as well as Client IP ?

 

I tried to something like that:

LogFormat "%t \"%m %{dispatcher:uri}e%q %H\" %{dispatcher:status}e %{dispatcher:cache}e [%{dispatcher:backend}e] %{ms}Tms \"%{Referer}i\" \"%{User-Agent}i\"" dispatcher

 

But, not getting values for dispatcher:uri, dispatcher:status, dispatcher:cache

 

 

 

 

Thanks in advance.

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
1 Reply

Avatar

Correct answer by
Community Advisor