Bharat Ruparel wrote:
> Great work Max. Do you want to share with us what you did to create a
> custom log and actual troubleshooting process?
> Thanks.
> Bharat
Yeah - in the worker class:
class LmailWorker < BackgrounDRb::MetaWorker
set_worker_name :lmail_worker
@@logger = Logger.new("log/backgroundrb_custom.log")
def ldb(debug_text)
@@logger.info "### #{caller[0]}: #{debug_text}"
end
def create(args = nil)
# this method is called, when worker is loaded for the first time
ldb "created LmailWorker"
end
end
Example logger output -
###
/var/www/apps/e_learning_staging/releases/20081110183756/lib/workers/lmail_worker.rb:11:in
`create': created LmailWorker
This only gets me some of the way actually. I have two workers - one of
them responds, the other doesn't, and i don't get any useful information
from the one that doesn't respond. I can;t think of a way to diagnose
the problem :/
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---