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
To unsubscribe from this group, send email to
For more options, visit this group at

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
postedMay 23, '12 at 6:50a
activeMay 23, '12 at 6:50a

1 user in discussion

John: 1 post



site design / logo © 2022 Grokbase