Capturing debug output in C #

Is it possible to capture debug output (create a debug listener) in C #?

I would like to have functionality like DebugView , but I would like to log debug output to SQL Server. Or maybe the best way would be to make the DebugView log into a file and then submit the file to SQL Server?

I implemented TraceListener and added it to the Debug.Listeners , but it seems to debug it only from my application. What I want to do is capture debugging from all applications. Is there any way to do this?

+4
source share
2 answers

DbMon.NET is a simple .NET Player OutputDebugString at http://www.codeproject.com/KB/trace/DbMonNET.aspx seems to do what you want.

+5
source

If you really do not need to download your own log, I would use an existing logging structure such as log4net . This has an ADO.NET application that you can configure to write debugging or trace output directly to SQL Server.

-2
source

Source: https://habr.com/ru/post/1309395/


All Articles