Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Keep data for the current month only : logger « Development « Ruby
Ruby
Development
logger
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.