Windows Azure LogStreaming Service - Introducing Kudu

Update, October 2026 — what still holds and what does not.

Kudu is still there and still does this job, but almost every product name in this post has changed since 2013:

  • Windows Azure Websites is now Azure App Service. “Windows Azure” as a brand was retired in 2014.
  • The Kudu/SCM site still lives at https://<yoursite>.scm.azurewebsites.net and still streams at /api/logstream (the bare /logstream path below still redirects there). Deployment credentials still work the way step 3 describes.
  • The xplat-cli (azure site log tail …) is gone. Today: az webapp log tail --name <site> --resource-group <rg>.
  • The ASM PowerShell cmdlets (Get-AzureWebSiteLog) are gone with Azure Service Management itself. The Az module is the replacement; for log tailing the Azure CLI is the path of least resistance.
  • The curl option is the one part that aged perfectly. It still works exactly as written, and curl now ships with Windows out of the box — no Chocolatey needed.
  • The Royal TS link at the bottom is dead; code4ward is Royal Apps today. The integration idea still works — Royal TS has had web-page and command-line task types all along.

The text from here on is the 2013 original, unchanged.


Scott Hanselman has written a very interesting post about viewing/streaming trace logs from Windows Azure hosted websites on my dev machine. He has good arguments why to use tracing in your code. With Windows Azure you have the possibility to look at the trace output in realtime and without downloading log files via FTP. But that’s not very flexible, it’s slow and you don’t see the data in real time.

This is a quick overview of a new REAL TIME LogStream feature, how to use it and how to integrate it with Royal TS.

I want to describe the issues I had with configuring this for my Azure-hosted website as well as how to view the logstream without the Azure Command Line tools installed.

1) Setup your Windows Azure website

I will not go into details here — any tutorial out there will do. Make sure you published to Windows Azure and can view your website over an *.azurewebsites.net URL.

2) Add tracing

For this, you can check Scott’s blog post. Test until azure site log tail mysite works when you call ./trace.axd.

3) Configure a deployment user

In the dashboard of your website click “set up deployment credentials” to setup a new user for deployments. See more documentation in the Kudu wiki.

4) Checkout the Kudu project

Kudu is the engine behind git deployments for Windows Azure websites. It is open source (Apache Licence 2.0) and can be used locally in your own datacenter if you wish to.

Behind every Azure-hosted website, there is a Kudu service site. As an example:

  • Your website: http://azurelogstreaming.azurewebsites.net
  • The corresponding Kudu service site: https://azurelogstreaming.scm.azurewebsites.net

Note: the https protocol and the .scm. in the middle of the URL. The https is needed since you are required to send username/password over the wire. For more information about Kudu service URLs read Accessing the kudu service.

In order to stream the trace information to your browser/command line window, you have to connect to the Kudu URL and put /logstream at the end.

In the Kudu dashboard you can see the various REST endpoint URLs and also there is a nice diagnostic console. It’s still an experimental feature, but you can see what the backend already allows… I wonder if we see an integration with Visual Studio here in the future? (You can even edit the files on the server in the console.)

5) Enjoy live trace messages

Scott showed how you can grab the trace output via the Windows Azure Cross-Platform Command Line Tools. But there is no magic involved — Kudu is just a regular HTTP endpoint that you can access — so there are many other ways to display the output. Sweet!

Option 1: Use a web browser

Just point your browser to https://azurelogstreaming.scm.azurewebsites.net/logstream and enter the login/password you have just configured in step 3.

Since browsers buffer content until they get a complete document (which will never happen in this case) or they get a large amount of data, you won’t see output immediately. It is recommended to use curl or any other command line tool that does not buffer.

Option 2: Use curl and the command line

You can also display the trace output via a standard curl call (curl is a command line URL transfer library that works with http, ftp and many more):

curl -u deploymentuser https://azurelogstreaming.scm.azurewebsites.net/logstream -k

Note: In previous posts I have already given some love to Chocolatey. A simple cinst curl and you have installed curl.

Option 3: Use PowerShell

After installing the PowerShell tools for Windows Azure (which you can download via the Web Platform Installer) you can simply issue the following command to show the trace output:

Get-AzureWebSiteLog -Name websitename -Tail

Use the -Message parameter to filter for specific events, use the -Path parameter to filter for specific log types.

Integration in Royal TS

There are neat ways to integrate this in Royal TS: you could launch the Kudu diagnostics page from within Royal TS, or display the logstream of your website in realtime.