Start the log over whenever the log exceeds 100 megabytes in size. : logger « Development « Ruby






Start the log over whenever the log exceeds 100 megabytes in size.


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.Keep data for today and the past 20 days.