Hello @Satyam Chauhan,
welcome to this moderated Azure community forum.
The short answer is logging into the device and checking the logs on the machine itself.
Only when the device is running in a stable way while logging, even when the functionality fails, this log can be read.
You need to log into the device and check the log there.
You could try locally:
sudo iotedge logs TagDataProcessor -f
but that will probably fail also (it's basically the same logging).
So check the edgeAgent too
sudo iotedge logs edgeAgent -f
As an alternative, go back to the previous working version of the module or deploy another working module so you can be sure both the EdgeAgent and EdgeHub are working as expected.
It's a good thing to have a second way to connect to the device so you can log in into the operating system.
This could be done with a combination of AutoSSH and a stepping stone/jump box (a VM in the cloud where the edge device is connecting to using an outbound connection), a VPN , or Azure Arc.
As an alternative, you could try OSConfig.
This way, you are not depending on stability of the Azure IoT Edge runtime only.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.