I have developed various applications, on both Windows Phone 7 and Windows Phone 8, and many times, I needed to analyze a log related to a strange behavior of one of my apps for a specific user.
Often, it was not a crash but I needed to understand what the user did in order to obtain a specific thing.
The ideal solution, for me, was to be able to read the logging information that, I always put in my code/application, and that I usually read via Visual Studio.
Yes, I’m a big fan of the “DebugWrite()” method :-)…
However, this is impossible on any mobile phone but mine, developer unlocked and connected via USB to my laptop, so, I needed to look for a feasible alternative to this.
Therefore, I have written this logging micro-library, “portable”, that address this problem, logging both:
- On standard System.Diagnostic.Debug listener
- On a string array in memory, where it keeps the last “n” lines you write
The library is static so, it is easily usable by all components in a project. Furthermore, the library allows you serialize/de-serialize the content of the array on a local storage.
you can find it on MSDN code: http://code.msdn.microsoft.com/A-logging-solution-for-c407d880