A little bit of a rant: don’t log the word "failure" unless your are detecting a failure

I was parsing a OneNote debugging log around here recently and noticed this line in the log:

"<<time stamp>> OneNote: No failure detected. Resuming."

And that was it.  No log entry preceded it suggesting a possible failure.

To step back a bit, this log file (text) was about 26MB in size.  The easiest way to quickly find an error that was logged is to look for the word "error" or "fail" or "failure."  So that is what I was doing and stumbled across this.  This is slightly annoying since it breaks the quick creation of a tool to parse these logs.  If I wanted to write that tool now, I would need to add some logic to filter our "No Failure detected" if I ever encountered the word "Fail" as I was parsing the log.  It would be much simpler to just have the person who was making this log entry log "<<time stamp>> OneNote: Success:  <<other data if needed>>"

So I entered a bug to get the logging changed.  At this point, it may be simpler to just leave the logging intact and work around it on the test side of things.  It's just annoying and I wanted to vent some steam about this.  We need a rule "Don't log the word failure unless you are detecting a failure."

Sigh.  Now I will go back to work.

Questions, comments, criticisms and complaints always welcome,

Comments (0)

Skip to main content