You should use the Ruby on Rails logger block syntax
16-Aug-2024 534
Passing strings to the Rails logger methods (eg. Rails.logger.info(…)) causes unecessary object allocations, and if you’re calling methods to generate data for your log messages then it can cause unecessary CPU work too. In this post I’ll show you how to use block syntax when using your logger with Rails to save object allocations and CPU time.
You should use the Ruby on Rails logger block syntax #ruby #rubydeveloper #rubyonrails #should #Rails #logger #block #syntax https://rubyonrails.ba/link/you-should-use-the-ruby-on-rails-logger-block-syntax