If you're worried about the log files growing infinitely in size, you can implmement log file rotation. It keeps the log files to a manageable size, and you can either archive or even delete the previous log files, depending on the criticality of your application.

Retention is often a legal issue, as logs can often contain personal information that's regulated.

Ruby's logger supports both size-based rotation as well as periodic rotation. Check out the docs to learn more.

Alright, that's enough information about the logging in Ruby. Let's put the Logger class to good use in our no-rails web application written in Ruby.