Writing exceptions in multihreaded windows service to event log
        Posted  
        
            by Ziplin
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ziplin
        
        
        
        Published on 2010-06-12T18:34:09Z
        Indexed on 
            2010/06/12
            18:42 UTC
        
        
        Read the original article
        Hit count: 283
        
I have a multithreaded windows service that will unpredictably stop running once every 24 hours or so. I am writing to the event log and that's going through just fine, but whenever the service crashes there are no messages in the event log (even that the service stopped, despite having AutoLog=true). Is there a way to have uncaught exceptions written straight to the log, even if they aren't in the original thread?
© Stack Overflow or respective owner