Diagnostics.XTrace / AutoFlush

1
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
 
asked 2/23/2018 8:37:28 PM
add a comment

1 Answers

0
We would like to answer your questions as follows: - What is the influence to the performance (is it notable, if the log is on)? No unless you set the Level property to Transfer which will record every byte sent and received to and from the server. - Has the log file to be maintained (as it becomes bigger and bigger in a short time -> see also below)? Generally, you dont have to worry about the file. If it's too big you may want to delete it. New questions: - What should 'after every write' say to me? That means a new message will be flush to the file immediately - How often is a write done? We use FileStream under the hood, so it depends on file buffer not interval - 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? We will consider adding a property to allow setting buffer size in a future release Thanks for your suggestion and we will definitely add more lines to our documentation regarding this API. We love to hear more ideas from you and other customers.
 
answered 2/23/2018 10:48:10 PM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged ultimate sftp or ask your own question.