A Rails middleware to change the log level at runtime

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 https://rubyonrails.ba/single/a-rails-middleware-to-change-the-log-level-at-runtime

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles