y learn Trace/Debug classes in dotnet

I believe log4net (and others like NLog) are better than the built-in, but the built-in has one nice feature — In visual studio, the output window conveniently shows the log messages if you use Trace.WriteLine or Debug.WriteLine.

Note output window isn’t the console.

Can log4net write to the output window? See http://angledontech.blogspot.sg/2011/08/direct-log4net-output-to-visual-studio.html. A bit of work. When I start a new project and have no time to set up log4net, then I use Trace/Debug to dump to the output window automatically, by default.

Reason2 – some projects may use the builtin not log4net.

Reason3 – some projects use other logging frameworks, so you may need to learn multiple logging frameworks. If you are lazy and you can decide, then the builtin is a basic solution always available.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s