Subject: Diagnostics.XTrace / AutoFlush
Date: 2018-02-23 20:37:28
From: fredy.wenger@matso.ch
Source: diagnostics-xtrace-autoflush
----------------------------------------------------------------------

Hi  
Unfortunately, I only have received insufficient answers in the thread linked below.  
Therefore, I open this new thread in the hope for **clear answers**.

[Link to "old" thread][1]


  [1]: https://www.componentpro.com/qa/exactly-causes-error-the-connection-closed-server

I have implemented Diagnostics.Xtrace in the meantime in my local test environment, but have to be very careful, before I can overtake it in the "real" test environment and later in the production environment.  
I was able to setup Diagnostics.Xtrace in my local environment, whereby I only can to absolute base tests (connect and disconnect).  
-> Trace to file works -> the file is created


**Not answered questions:**

 - **What is the influence to the performance (is it notable, if the log
   is on)?**
 - **Has the log file to be maintained (as it becomes bigger and
   bigger in a short time -> see also below)?**


To the XTrace, there it a property "Autoflush"  
With comment:  
// By default the AutoFlush property is true.  
// If you wish to turn it off, just set it to false as follows:  
// ComponentPro.Diagnostics.XTrace.AutoFlush = false; 

In the "detail description", I only found:  
"Gets or sets whether Flush should be called on the Listeners **after every write**."

**New questions:**
 - **What should 'after every write' say to me?**
 - **How often is a write done?**
 - **It don't seems as to every event - so I think there is a buffer and if the buffer is full, the buffer *(and also the trace file?)*  is flushed?**
 - **If so (buffer), can the size of buffer can be set and if yes.. how?**

**Thanks for a clear answer to all of my questions.**  
And.. suggestion:  
I would "add some more lines" to your documentation, so that themes like this becomes clear (and the customer can save the time to ask such questions and find out by try-and-error and **you** can save the time to answer ;-).  
**Note: Otherwise, I am very satisfied with the component...** 

Thanks

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index