Hi Harshraj,
When using the Mendix cloud, you can access/download the logs via Sprintr if you have enough access rights. Open your project and go to ‘Logs’ underneath ‘Deploy’ in the left section of your page.
If you want to display the logs in-app, you could consider using a version of the Logging Module in the marketplace. Please keep in mind that the log messages will be written to your app database in this case, which could cause a performance or security issue.
https://marketplace.mendix.com/link/component/113006
Last but not least, you can use external tools to get the most out of your logs. You can read more about this below.
https://docs.mendix.com/developerportal/operate/monitoring-with-apm/
Hopefully, this helps.