Hello @Omar Navarro ,
Azure IoT modules have logging as seen on the device itself using
iotedge logs -f --tail 100 [modulename]
These logs can also be read in the cloud using edgeAgent direct methods like 'ping' and 'RestartModule' and 'GetModuleLogs'.
If you use the Azure portal to look up modules in a device, check out the 'Troubleshoot' button.
This brings you to a page where you can see the current logging of the selected module, download the logging, or restart the module:
The logs cannot be queried directly. You need to access the logging based on a certain timespan.
From there, you can do whatever you want with the logging you got.
You need a live connection to the device, offline devices do not offer access to log files.
Getting logs is not done for free, it will be counted as part of the daily amount of messages you can exchange for your IoT Hub (1 unit of the S1 tier offers 400.000 daily messages of size 4KB).
---
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. By doing so, all community members who have a similar issue will benefit. Your contribution is highly appreciated.