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
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @vhochsteinTef
There is no OOTB request filter based on id but in local you can download and try rlog utility to filter logs
Hi @vhochsteinTef
There is no OOTB request filter based on id but in local you can download and try rlog utility to filter logs
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 ?
Views
Replies
Total Likes
Hi @vhochsteinTef
Not sure if this is possible or not but you can explore the official osgi documentation : https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.log.html#org.osgi.service.log.LogEntry
https://sling.apache.org/documentation/development/logging.html
Views
Replies
Total Likes
Views
Likes
Replies