Ruby/Development/logger
Материал из Wiki.crossplatform.ru
Содержание |
Adding Logging To Your Application
require "logger" $LOG = Logger.new($stderr)
Keep data for the current month only
require "logger" Logger.new("this_month.log", "monthly")
Keep data for today and the past 20 days.
require "logger" Logger.new("application.log", 20, "daily")
Start the log over whenever the log exceeds 100 megabytes in size.
require "logger" Logger.new("application.log", 20, "daily")