Getting Error Log when phone is disconnected from PC

I have a WP7 app for the mango version. When I deploy the app to the phone through the Application Deployment tool I can't get the error logs or the log report. I needs logs to check what is happening behind. Its important. How can I achieve this? Is there a way to get record and get the log of the app that is running? Am using logger statements as below:

#if LOG_ENABLED
                                Logger.log(TAG, "Client not received any UserId from server response.. so Exiting the application.");
#endif

and the logger class is implemented like this:

 public static void log(string tag, string str)
    {
#if LOG_ENABLED
        string  strMsg= new StringBuilder().Append(DateTime.Now.ToShortDateString()).Append(" , ").Append(DateTime.Now.ToShortTimeString()).Append(" : ").Append(tag).Append(" : ").Append(str).ToString();            
        System.Diagnostics.Debug.WriteLine("Telus Application log : "+strMsg);           
       // LogOffline(strMsg);
#endif
    }

 internal static void log(Exception e)
    {
#if LOG_ENABLED
        System.Diagnostics.Debug.WriteLine("Telus Application log : {0}", e.StackTrace);
#endif
    }

I have no problem to get the logs when the emulator is running or even if the app is deployed on the phone through Visual Studio.

Thanks!! :)

Answers


One Solution would be to write the Log into the IsolatedStorage. You can then access the IsolatedStorage either by using the IsolatedStorageTool or you can add an Option into your App which shows it in-App.


As far as I know, System.Diagnostics.Debug.WriteLine only outputs the message in the Visual Studio Output window when debugging an app (and of course Visual Studio needs to be connected to the Windows Phone emulator or device).


Need Your Help

How to integrate thrift module with react native?

android node.js react-native thrift

Im using react-native (on Linux) to create some android application which has a client-server protocol. This client-server protocol was made with Thrift.

Entity to json error - A circular reference was detected while serializing an object of type

c# .net json entity-framework asp.net-mvc-4

Following error occurred when trying to convert entity object into JSON String. I'm using C# MVC4 with code first DB designing. It seams its because FKs and relationships between tables create this...