Logging in Ruby: (Almost) Everything You Need to Know

This post provides an in-depth overview of logging in Ruby, one of those topics that seems totally unnecessary until something goes wrong.It's very easy to find and fix bugs when you're in the development mode. You have the terminal open with the Rails logs scrolling by you. If something goes wrong, just replay it, find the error in the terminal, and fix it.But in production (or even staging), you can't just open the terminal and search the endless terminal output. Past a limit, it won't even let you scroll up. You need a better solution. You need to redirect the log streams to a different destination than the standard output to view or archive them, e.g. log files or a 3rd party service. You need logs that can be quickly searched and organized.
Logging in Ruby: (Almost) Everything You Need to Know #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/logging-in-ruby-almost-everything-you-need-to-know

Nezir Zahirovic

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

related articles