Hi Team,
Our project is Remote SPA, the AEM page data is exposed by jackson exporter like content/my-site/us/en/sample-page.model.json. Each component is implemented by jackson exporter.
So I have a requirement of write each page.model.json request coming to AEM should be logged into logs/request.log.
Some details every sling model is implementing ComponentExporter (com.adobe.cq.export.json).
@arunpatidar
Urgent requirement.
Thanking in advance
Solved! Go to Solution.
Views
Replies
Total Likes
First of all it may not be a good idea to log the entire json into your log file for every request that comes to publisher, but if you really intend to have it, one option is adding a sling filter that intercepts all requests with mode.json as selector.extension configuration, and as part of that filter you can log the entire json response. Hope this info helps. Thanks !
Sorry I don't understand your question, I see the requests are being written in the request.log for the SPA remote as well, see below:
hi @EstebanBustamante , Thanks for your reply, In request.log it won't print .model.json response, I want it to print page.model.json response.
If you see a network call to page.model.json then it should be logged in request.log.
First of all it may not be a good idea to log the entire json into your log file for every request that comes to publisher, but if you really intend to have it, one option is adding a sling filter that intercepts all requests with mode.json as selector.extension configuration, and as part of that filter you can log the entire json response. Hope this info helps. Thanks !
Hi @mahi1729 , Thanks for your reply. Yes it is correct, We have implemented with Filter that it interscept every request. But it is client requirement as we have to implement it.
Views
Likes
Replies