Adding custom diagnostic data to email

6 posts, 1 answers
  1. Tim
    Tim avatar
    19 posts
    Member since:
    Dec 2011

    Posted 21 Apr 2012 Link to this post

    Is there a way to add custom diagnostic data to the email sent by the RadDiagnostics class? I would really like to include whether or not the user is running a trial version of the application. I thought that RadDiagnostics.AddDebugInfo() would add data to the email, but it doesn't.

    Example:
    void radDiagnostics_ExceptionOccurred(object sender, ExceptionOccurredEventArgs e)
    {
        RadDiagnostics.AddDebugInfo(string.Format("[AppIsTrial]:{0}", UserSettings.IsTrial));
    }

  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 23 Apr 2012 Link to this post

    Hi,

    Yes it is possible. Please see this help article:http://www.telerik.com/help/windows-phone/diagnostics-features-diagnosticdata.html

    Kind regards,
    Valentin.Stoychev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Tim
    Tim avatar
    19 posts
    Member since:
    Dec 2011

    Posted 23 Apr 2012 Link to this post

    Thanks for the link, but if you'll note my code sample, I've already found that posting. Am I doing something wrong? Am I misunderstanding how this works?
  5. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 23 Apr 2012 Link to this post

    Hi Tim,

    The DebugInfo can be used to add data during the normal application lifecycle, but not when the ExceptionOccurred event is fired because at this point the DebugInfo is already generated. If you want to add information in the event handler, you can use the CustomData in the ExceptionOccurredEventArgs:
    void radDiagnostics_ExceptionOccurred(object sender, ExceptionOccurredEventArgs e)
    {
        e.CustomData = string.Format("[AppIsTrial]:{0}", UserSettings.IsTrial);
    }
     
    The data will be included at the end of the email as Value for the "[**Custom Data**]" key.

    if you have other questions, don't hesitate to write us back.

    All the best, Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Tim
    Tim avatar
    19 posts
    Member since:
    Dec 2011

    Posted 23 Apr 2012 Link to this post

    Excellent, thanks Todor. I will try that out.
  7. Tim
    Tim avatar
    19 posts
    Member since:
    Dec 2011

    Posted 24 Apr 2012 Link to this post

    Thanks Todor. For others reference, it shows up at the very end like so:

    [**Custom Data**]:[[AppIsTrial]:False]
Back to Top
DevCraft banner