Keep data for the current month only : logger « Development « Ruby






Keep data for the current month only


require 'logger'
Logger.new('this_month.log', 'monthly')

 








Related examples in the same category

1.Adding Logging To Your Application
2.Keep data for today and the past 20 days.
3.Start the log over whenever the log exceeds 100 megabytes in size.