Wednesday, October 10, 2007

What did I learn today?

Ever have one of those days? Days that ... well ... you struggle to find motivation to do much beyond reading the Onion?

I do. So in the spirit of keeping my brain kickstarted and engaged, I thought I'd try to do a "what did I learn today?" post. For about a week and a half. We'll see how it goes.

today..

Yesterday while searching for a canned logging solution that's more robust than my liberal system.diagnostics.debug.writeline's....I came across a couple of things. log4net was developed by the apache group. Big. Robust. Configurable n^n different ways. I'd run across it before and, frankly, run screaming the other way. (at that point my problem was a fly and log4net a howitzer)

Enter NLog. Short. Sweet. To the point. It "Just Works". Add a reference, define your targets in a (blessedly simple) .config file, and you good to go baby! No fuss, no muss, no reinventing the wheel.

Today's learning:

A word to the not-so-wise. (ie, others like me) If you're following along the tutorial (very straightforward and well done, btw), and you decide to create a windows form app instead of a console app. (because. You know. You're not really thinking..) And then you wonder why the "log to console" bit of the tutorial just isn't working...



Yeah. You got it. Console output doesn't just magically pop up in a windows forms app.

(bonus question: why not? Three minutes of googling didn't find me the answer, so I'll table it for now..)

0 comments: