Hi @Muhammad Abdullah ,
Thanks for the question and using MS Q&A platform.
Apology for the Inconveniences.
Sending .txt log files from your web jobs to Azure Log Analytics is very convenient.
Make sure that App Service diagnostic configuration is done to send predefined logs for Web Jobs status to Log Analytics.
Automate the process of reading the log files on a periodic basis and send the content of the .txt file to Log Analytics.
Use Azure Monitor REST API or Azure SDK to send your logs.
Using Azure Monitor Data Collector API .
In Log Analytics, these logs can be queried through Kusto Query Language (KQL).
AppServiceWebJobs
| where FileName contains "logfile.txt" // Replace with actual log file name
| project Timestamp, LogMessage
An azure function can be set up or use a script as a task in a cron job to automatically transfer the logs stored in the Web Jobs .txt files to Log Analytics.
And perhaps a Timer Trigger in Azure Functions can be used for log uploads frequently.
Let me know if you have further assistances.
Ingest data into Log Analytics
Troubleshoot common Azure Spring Apps issues