log-block
Simply library to allow logging with indenting for ease of reading.
Example
@logger = Logger.new( STDOUT )
@logger.debug("Trying something new")
@logger.with "-> " do |log|
log.debug "First step"
# Do something
log.debug "Second step"
end
Produces the following in your log:
D, [2009-03-27T20:50:16.910769 #29567] DEBUG -- : Trying something new
D, [2009-03-27T20:50:16.911328 #29567] DEBUG -- : -> First step
D, [2009-03-27T20:50:16.911421 #29567] DEBUG -- : -> Second step
Copyright
Copyright © 2009 Jon Moses. See LICENSE for details.