Log file goodness

I’m learning to see the helpfulness of good logging.  There’s already a good logging discipline here around me.  My program was terminating abnormally and I couldn’t figure out where the problem was coming from.  I fired up the debugger* and was able to figure out what the problem was.  Then I looked back in the log files to see if I could have divined from the log output where the issue was.  Yes, I could have.  Here’s the end of the log file:


Notice all the functions being entered, but not left?  (the squares with arrow pointing to right)  We can see that about the last thing that’s in process is loading from an xml file.  I checked my machine and …I was missing that xml file.  I could have saved myself a lot of wasted time fiddling with my source code, reverting to previous versions, rebooting machines, and the like, if I had been able to recognize the signs of something wrong when I looked at this the first time.

*(without copying source code — how that worked is worthy of a separate post)


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

This site uses Akismet to reduce spam. Learn how your comment data is processed.