Trace output not getting logged in output file at times
I'm using TextWriterTraceListener to log error messages to a text file.The TraceOutputFile has been mentioned in the web.config file as "trace.log.txt". The error messages are getting logged to the trace.log.txt. But at times I notice that some files are getting generated randomly under root folder with the exception details instead of logging to the trace.log.txt.
This is not happening in any particular page and hence I am unable to detect the reason as to why these files are getting generated.Ex:14dbc20a-9eb8-4fec-开发者_JAVA百科b6bd-54400db2ceatrace.log.txt .
Can u suggest me any circumstances when this might happen?
if you are familiar with ETW tracing, you could register EventProviderTraceListener instead of TextWriterTraceListener. You could details how to do that here.
I saw something similar when I had two threads trying to write to the log file at the same time whilst using the Enterprise Library logging classes.
精彩评论