Use logger.info or .debug
.warn is private for some reason but you can do logger.send(:warn,"msg") to get around that most likely. On Mar 28, 2011, at 9:23 AM, Bakul <[email protected]> wrote: > I'm trying to call a ruby function from Capistrano task which uses > ruby logger library. It seems that Capistrano tries to use it's own > logger library for ruby call which result in following error: > > /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/ > logger.rb:14:in `initialize': undefined method `[]' for #<IO: > 0x2b224dc96ae0> (NoMethodError) > > > This is what I have in my ruby code: > > <code> > require 'logger' > > @@logger = Logger.new(STDOUT) > </code> > > Is there a way to use logger inside ruby function. I would prefer > using logger instead of puts. > > >> cap --version > Capistrano v2.5.10 > >> ruby --version > ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] > > > Thanks, > Bakul > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" 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/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups "Capistrano" 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/capistrano?hl=en
