2

We have Sitecore Managed Cloud on Azure, Sitecore 9.3.

I finally found where Sitecore writes the Sitecore logs: in the website folder itself, in /App_Data/logs/RD00155DE2A656/ (on our site at least), with filenames "azure.log.[date].[time].txt".

My question is: Is there a way to download the active log file (i.e. the latest one, the one Sitecore is currently writing to when the site is running)? I'm using an FTP client (WinSCP) to download files from the app service's FTP server, but when I try to download the active log file, WinSCP gives me the error

The process cannot access the file because it is being used by another process.

2 Answers 2

1

I usually access any file in an Azure web app using the Advanced Tools (Kudu), listed under Development Tools in Azure Portal.

The Debug Console section in the Advanced Tools offers file access via CMD or Powershell.

enter image description here

Each file can be downloaded, deleted or edited. Each directory can be downloaded or deleted.

If you are already authenticated in the Azure Portal, you can access directly this section adding the scm subdomain to your Azure web app domain:

https://your_azure_web_app_name.scm.azurewebsites.net/DebugConsole

1
  • Thanks! I didn't see how I could use a console on the server to download a file, but then (1) I realized I could use the console to copy the file locally, then download the copy via FTP, and (2) I discovered that the DebugConsole page has a browsing and downloading UI separate from the console itself. Commented Apr 23, 2020 at 21:10
0

Depending on how much access to Azure resources you have in Sitecore Managed Cloud, Sitecore running in Azure Web Apps typically use Azure Application Insights to send logging information, called traces, to App Insights, instead of or in addition to, the file based logging.

Sitecore has a KB Article on accessing the Sitecore Logs via Azure Application Insights, which is located here: https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0911837

In that article, it provides a AzureTools.aspx file that can be dropped into a Sitecore implementation. From there, you provide an Application Insights API Key and Application ID, and you can retrieve logs based on the role: CM, CD, REP, PRC, etc). This also allows you to download the logs, as files that you would typically get off of an On-Prem Sitecore implementation as well.

The second part of this article also talks about using the Query Editor in Application Insights to query the traces of logs that are stored in AI.

Note: At the time of this posting, the AzureTools.aspx download from Sitecore's Box account appears to have been moved. Contact Sitecore Support to get access to this file.

1
  • Thanks, I hope this helps others. For me, my org gave up on Sitecore and we're working on migrating to another CMS. Commented Nov 3, 2022 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.