locked
Develop a Log System

    Question

  • Hello everybody!

    I need to implement a Trace system on windows store apps in order to read the all logs of the app.

    Someone got an idea?

    Thanks

    Friday, February 13, 2015 1:23 PM

Answers

  • There are few options:

    1. FileLoggingSession and LoggingSession classes generate files that can be used by Windows Perfomance Analyzer and Event Viewer. The documentation is not great and files can be really big (few hundred MB).

    2. EventSource class provides basic infrastructure, but you will have to create own EventListener.

    3. HockeyApp can help a bit, but it's not available for Windows Store apps.

    4. Custom tracing into a file. This may be most appealing, as you have full control and don't have to implement other framework's details. However, be ready to face suspend/resume and async challenges. For example if you want your app to report an exception, then Application.UnhandledException must finish file write before it exit (can't simply write await FileIO.WriteTextAsync() as it will quit event handler and app will close before write finishes).

    In either case keep in mind that your app can write to local app data folder only, other locations will require user specifying them via File/FolderPickers.


    S.G.

    Friday, February 13, 2015 6:31 PM