문제

Does Diagnostics.TraceSource support buffered logging or some other queuing mechanism?

I've no doubt come across the plethora of questions on the various logging frameworks. On many of those questions someone chimes in that "I wish people would just use TraceSource it does everything log4net and NLog does". But in my travels and googles I haven't found any discussion on buffered or batch logging, like that supported in NLog and Log4Net.

도움이 되었습니까?

해결책

By itself, no. But there is nothing stopping you from implementing a TraceListener that does it. The model appears to be open enough to latch on pretty much any logging requirements you need to. Just be sure to to make your TraceListener at least as thread safe as TraceSource itself.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top