

Logging and Learning - dcurtis
http://tom.posterous.com/logging-and-learning

======
patio11
I agree so much with the "Log files are where data goes to die" that it hurts.
Here's what I spent half an hour investigating this morning.

The general flavor, with more than a few details fictionalized: picture your
standard credit card order form.

First Name: Elaine Smith who teaches in 6th grade at George Washington Middle

Last Name: School

Now, in a real comedy of unlikely events, everybody just passed that
transaction along to the next step of the chain.

My app: Paypal collects billing details, let them worry about the correctness
of them.

Paypal: She's got a username and password and a Paypal balance? Transaction
authorized!

Payment processor: A transaction from Paypal? OK, email straight to her spam
folder, hit the script on Patrick's site to record transaction.

Script: First name, please? Hurk. _writes error message to log file_

Customer: Where's my stuff?

Me: _checks records_ That's funny, I can't find a record of this transaction
anywhere in the database... Why don't I spend thirty minutes fruitlessly
searching for variations of her name? Oh, no dice, hmm, one last thing to try:
_sudo grep "George Washington" production.log_... Oh crud.

New feature as of this evening: any hits on the sale notification script which
do not result in a successful save to the database are going to displayed on
my web dashboard in Blaze Orange.

------
jrockway
Whenever there is a weird bug in my software, I wish I had logged more.

To prevent this from happening, I just put the request, state, and response
objects into my object database now. It doesn't really take up all that much
space, and it is nice to have a big picture of what is going on with the app.

The next step is to start logging data flow at key points.

(BTW, this data all "dies"... but it is nice to have when something is
obviously failing. You can always process data you have; you can't process
data you don't have. Log now, ask questions later.)

------
RWilson
You reached these Keeeeds!

~~~
tdavis
A certain part of me always hopes that people "get" my seemingly random
headers. Bonus points if you tell me where the last one is from.

~~~
fallentimes
Starship Troopers: winner of the most unexpected shower scene of all time.

------
raju
I don't mean to take away from the discussion here, but any one know of any
good books/resources that cover this topic. At my current project we have been
having an on-going tussle between logging too much and too little and I am
hoping to find anything that helps. Thanks!

