Get stream Diagnostic trace log via Azure command line plus glimpse

Source: Internet
Author: User
Keywords Azure azure trace log command line Glimpse Stream diagnostics
Tags aliyun application code command line debugging get html http

As I've always said, "When you have doubts, turn on the trail." 8630.html "> Sometimes" got here "-debugging is a good tool. I tend to use a lot of System.Diagnostics.Trace in my code. Then use Elmah or glimpse to learn more.

Recently, though, I've tracked the data I want on some http://www.aliyun.com/zixun/aggregation/13357.html ">azure" sites, and sometimes I get it through the azure command line.

I will deploy this (or deploy it through Visual Studio):

Azure site Create MySite--gitgit Add. Git commit-m "initial deploy" git push Azure master Then if I want to reboot, start, stop tracking sites and so on, I certainly can. Azure Site Restart MySite

Besides, I used to talk to a dev and say I really did.

Azure Site Log Tail MySite

They did it! Check this out. You can try it now.

Add tracking to your application

First, make an application with some tracking. Here's My. Any asp.net application is OK, MVC, Web Forms, or Web Pages. But pay attention to the way of tracking.

public class Homecontroller:controller {public ActionResult Index () {viewbag.message = ' Modify This temp           Late to jump-start your asp.net MVC creator. "           System.Diagnostics.Trace.TraceError ("zOMG");       return View ();          Public ActionResult About () {viewbag.message = "Your App description page."          System.Diagnostics.Trace.TraceInformation ("ethically chillin.");      return View (); }  }

Then, upload it to azure. In this case I direct through vs release, just right-click to select Publish and import the Publish profile you downloaded from the portal. You are free to publish.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.