hi, just a quickie,
how do i write custom error messages to the log so i can debug a little better.
similar to writing stuff to the Javascript console with console.debug('222'); or alert('444');
appreciate it?
hi, just a quickie,
how do i write custom error messages to the log so i can debug a little better.
similar to writing stuff to the Javascript console with console.debug('222'); or alert('444');
appreciate it?
ahh,
think i found out how,
http://www.boowebb.com/2008/01/09/writing-to-the-log-in-rails
RAILS_DEFAULT_LOGGER.info "foo bar"
right so far
but you need RAILS_DEFAULT_LOGGER only in tests in normal model, controller or view code you can use
logger.info "foo bar"
logger.error "My Error" logger.info "My FYI to the log" logger.debug "My debug"
-Fredrik John Griffiths wrote:
thanks,
well this is annoying, i can't get it to post messages to the log, but the code runs thru ok; argh!
logger.info "some message"