locked
Logging and multithreading

    Question

  • Hi there,

    I'm writing a Windows Store App using C++. I use the FileLoggingSession- and LoggingChannel-class from the Windows::Foundation::Diagnostics-namespace for logging messages to a file.

    The app has serveral asynchronous operations that need to be logged, too. The problem is that the logged messages are displayed in the order they occured (using Windows Message Analyzer). Thus, messages from different threads get mixed up. 

    So my question is whether the LoggingChannel etc. respect the originating thread of the messages and I'm just using the Windows Message Analyzer wrong or whether there is any possibility to log the logging thread to the file, too? I read something about the AsyncCausalityTracer-class, but I don't really get it.

    Thanks in advance, Lichtenschwein

    Friday, April 3, 2015 8:27 PM

All replies

  • In my view, Windows Message Analyzer don't care of a log message's created source

    There are a lot of threads about this scenario: http://blog.instance-factory.com/?p=181

    Maybe you need to analysis the log file instead of using WMA


    Best Regards,
    Please remember to mark the replies as answers if they help

    Monday, April 6, 2015 3:21 AM