Event Logging in Windows 8.1 application RRS feed

  • Question

  • Hi All,


    I want to implement logging framework in my windows 8.1 application and also am new to windows 8.1

    Which will have the property of appending and rolling over when certain size of the file is reached.


    In Windows 8.1 I found two options but also found very little documentation and info about which to use and when.


    Microsoft recommendation is to use FileLoggingSession as mentioned in this build video. http://channel9.msdn.com/Events/Build/2013/3-136


    I have couple of questions on FileLoggingSession

    (a)  I have done a POC where the logs are only written to disk when I call closeAndSaveToFileAsync() but this is supposed to be a termination/suspension scenario call which closes the file. I would like to have logs even if there are no errors or application termination. When the logs are actually written to disk ?

    I need more like Logging Session's saveFileAsync()

    (b) It is mentioned that when maximum file size is reached. Content from memory is flushed to disk and LogFileGenerated event is called. I could not figure out what is the maximum size of a file. Can it be configured any way ?


    Second option I found was using Metro Log https://github.com/mbrit/MetroLog. Though haven't tried it in my application. But seems to have very less documentation and community support.


    I would really appreciate if anyone can share his/her experiences with logging in Windows 8.1 application and answer/comment on my questions/understanding above.




    Wednesday, February 4, 2015 6:36 PM

All replies