There are some differences in how Ruby 1.9.3-p198 and Rails 3.2.3
handle logging a program name.

# Standard Ruby Logger:
logger.error('program name'){'message'}
logger.error('program name'){exception}

# Rails:
Rails.logger.error('message', 'program name')
Rails.logger.error(exception, 'program name')


If trying to switch between the two, using the standard logging format
with the Rails logger, I find that Rails ignores the block and logs
the 'program name' as the message instead.

Attempting to use the Rails format in IRB errors out with:
ArgumentError: wrong number of arguments (2 for 1)

Is this intentional or is it a bug? I haven't seen anything logged on
it anywhere, but may not be looking in the right place.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMay 23, '12 at 6:50a
activeMay 23, '12 at 6:50a
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

John: 1 post

People

Translate

site design / logo © 2022 Grokbase