tags:

views:

310

answers:

1

I looked around and couldn't find one. Is there an equivalent of Log4X for Ruby? If not what's the best way to handle all the debug statements. I'm fairly new to Ruby.

Thanks!

+6  A: 

Ruby comes with a built in logging library, but there's log4r.

A short example of the built in library:

#!/usr/bin/env ruby
require 'logger'

log = Logger.new('mylog.txt')
log.debug "Hello log"
dommer
Wow, thanks for the quick answer!
Chumpboy