Trace file isn't being created even though TraceEvent is called?

后端 未结 2 1900
后悔当初
后悔当初 2020-12-12 07:48

Objective

Use System.Diagnostics to perform tracing. Though I have used log4net and other logging solutions, I am only interested in getti

2条回答
  •  一生所求
    2020-12-12 07:55

    Two things:

    1) Your workflow is most likely stopping due to exceptions because your .config file is not right. Note the changes:

    
      
        
          
            
          
        
      
    
    

    2) You've to flush the listeners, otherwise they won't be written. You can do it in two ways.

    Explicitly call Flush method on your logger variable using again InvokeMethod activity.

    OR

    Turn on auto flush on config file:

    
        
        ....
    
    

    That being said, I don't know if you're aware of Workflow Tracking and Tracing capabilities. It looks a good fit for your needs. Check this answer for more links and examples.

提交回复
热议问题