class Lumberjack::Logger
def open_device(device, options) # :nodoc:
Open a logging device.
def open_device(device, options) # :nodoc: if device.nil? nil elsif device.is_a?(Device) device elsif device.respond_to?(:write) && device.respond_to?(:flush) Device::Writer.new(device, options) elsif device == :null Device::Null.new else device = device.to_s if options[:roll] Device::DateRollingLogFile.new(device, options) elsif options[:max_size] Device::SizeRollingLogFile.new(device, options) else Device::LogFile.new(device, options) end end end