A Rails middleware to change the log level at runtime
20-Jun-2019 2309
Have you ever found the Rails logs too verbose in development?When working on a Rails application, you don’t always need that amount of detail in your logs. From time to time, a less verbose log is more than enough, especially after a long day coding. To change the log level by editing the settings is easy but you will also need to restart the server. And in some situations, it would be helpful to change the verbosity from request to request.For this reason, in this article, we will see how to create a small middleware to change the log level at runtime.
A Rails middleware to change the log level at runtime #ruby #rubydeveloper #rubyonrails #Rails #middleware #change #level #runtime https://rubyonrails.ba/link/a-rails-middleware-to-change-the-log-level-at-runtime