Jay McGavren's Journal

2008-04-28

Java: log.debug(“Found chain ‘” + chain + “’ for property ‘” + propertyCode + “’”); Ruby: @log.debug “Found chain ‘#{chain}’ for property ‘#{property_code}’”

Those few extra characters may not seem like much, but they actually reduce the amount and detail of log statements I put in the code. They’re painful to type, and worse, painful to read.

Logging is fast taking a place next to unit testing in my essential toolbox. Anything that important needs to be as painless as possible.

comments powered by Disqus