ROFL

My little logger wrapper. Will give you easy access to logger functions with class and caller method info.

Installation

sudo gem install pangdudu-rofl --source=http://gems.github.com

Usage

Logging

look at the test_rofl.rb or simply do this:

require 'rubygems'
require 'rofl'

you can then use the methods: elog,wlog,ilog,dlog

where elog is like:

logger.error "text if you like"

wlog is like:

logger.warn "text if you like"

ilog is like:

logger.info "text if you like"

dlog is like:

logger.debug "text if you like"

Tracing

If you take a look at ‘lib/rofl_trace.rb’ you’ll discover some fun stuff. :)

What might come in handy if you have no clue whats going on in somebodies code:

rofl_enable_trace
#...some code
rofl_disable_trace

You can encapsule code like that and then get flodded with all the ‘calls’ that happen in the vm.

/^(call)/ is the default regexp, but there’s more fun stuff to trace out there: returns, sends, …

Have phun kidz!

Rule the universe!

Log,log,log.

License

GPL -> www.gnu.org/licenses/gpl.txt