Keep data for today and the past 20 days. : logger « Development « Ruby






Keep data for today and the past 20 days.


require 'logger'

Logger.new('application.log', 20, 'daily')

 








Related examples in the same category

1.Adding Logging To Your Application
2.Keep data for the current month only
3.Start the log over whenever the log exceeds 100 megabytes in size.