# File log4r/outputter/datefileoutputter.rb, line 47 def initialize(_name, hash={}) @DatePattern = (hash[:date_pattern] or hash['date_pattern'] or DEFAULT_DATE_FMT) @DateStamp = Time.now.strftime( @DatePattern); _dirname = (hash[:dirname] or hash['dirname']) # hash[:dirname] masks hash[:filename] if _dirname if not FileTest.directory?( _dirname) raise StandardError, "'#{_dirname}' must be a valid directory", caller end @filebase = File.basename( $0, '.rb') + ".log" else @filebase = File.basename((hash[:filename] or hash['filename'] or "")) end hash['filename'] = File.join(_dirname, @filebase.sub(/(\.\w*)$/, "_#{@DateStamp}" + '\1')) super(_name, hash) end