ASP.NET logging to Apache error_log

November 8, 2005

Grr, who designed the structure for the ASP.NET documentation? I have been scratching my head for nearly an hour trying to figure out how to place a message in the apache log file.

When you search you come up with 100 line solutions written by M$'s Most Valuable Pricks that show you how to write to windows event logs, send errors as email messages and send them as messages in a bottle. All of them seem to ignore this simple trivial one line solution.

Console.Error.WriteLine("hello wolrd");

This line of C# code will write the line hello world to your webserver log file. You cannot expect M$ fans to know how to keep things simple. I am sure the above works well on IIS too, I just tested it with mono on apache (mod_mono).


Posted by raditha at November 8, 2005 12:56 PM
Your Ad Here

 

Jabber  |  Linux  |  mySQL  |  PHP  |  Java  |  Site Map  |  Wiki

Downloads  |  About  |  Links  |  Contact  |  Home

 

Copyright © Raditha Dissanayake 2003 - 2007

Terms of Use  |  Privacy

 

 

November 2005
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30