简体   繁体   中英

IIS WebServer output log and C# debug.print

System.Diagnostics.Debug.Print("[fillmake] : 1\n");

Upper code display message at output window from visual studio .net IDE.

After I make publish web site and deploy at IIS web server.
I don't see any message output at IIS web server.

Let me know is there any things wrong.

How could I know output message from IIS web server.

you should use a proper logging framework not simply the Debug Output window of Visual Studio.

you can do this by including and using Log4Net or NLog or any other .NET enabled logging framework, you could easily get it up and running in minutes and have your logging saved to text file, windows event log, database, sent to you via email etc...

you could also use other TraceListeners of System.Diagnostics but in my experience Log4Net is way easier and powerful... personal opinion and based on what I have seen ;-)

Edit:

if you do not want to include any external reference in your project have a look at what the .NET framework itself offers to you already, read this one: TraceListener Class

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM