Expand my Community achievements bar.

SOLVED

AEM Cloud request Log requestId

Avatar

Level 2

Hi, 

aem request.log file includes a requestId. Please find example below.

 I would like to know if If there is a kind of global getter in AEM to get that requestId and use it in my own log statements in order to be able to identify what log messages belong to which request ?

30/Oct/2023:00:02:17 +0000 [4076] -> HEAD /libs/granite/security/currentuser.json HTTP/1.1 [cm-p43804-e183487-aem-publish-76466d7cb6-dzgms]

30/Oct/2023:00:02:17 +0000 [4076] <- 200 application/json 3ms [cm-p43804-e183487-aem-publish-76466d7cb6-dzgms]

 

Thanks a lot for your support in advance.

 

--

Volker

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @vhochsteinTef 
There is no OOTB request filter based on id but in local you can download and try rlog utility to filter logs



Arun Patidar

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @vhochsteinTef 
There is no OOTB request filter based on id but in local you can download and try rlog utility to filter logs



Arun Patidar

Avatar

Level 2

HI Arun,
any way I can as a workaround create my "own" requestId, which I can access "everywhere" in code, in order to log it at least in my custom logs and be able to add it to outgoing http requests for tracing purposes ?