Sitecore JSX Render Logging

To inject logging for incoming requests, modify the following file:\nextjs\node_modules\next\dist\server\lib\start-server.js

You can tap into "request" event and log out information:

srv.on('request', (req) => {
	console.log('AK Request', req.url);
	//console.log('-----------------------------', req.rawHeaders);
	//console.log('-----------------------------');
});

req object has a lot of other yummy info. You can see all the properties by just outputting req object itself

Leave a Comment

Your email address will not be published. Required fields are marked *