vendor/gems/logging-0.9.7/lib/logging/appenders/rolling_file.rb
# call-seq:
#    write( event )
#
# Write the given _event_ to the log file. The log file will be rolled
# if the maximum file size is exceeded or if the file is older than the
# maximum age.
#
call-seq:
write( event )

Write the given _event_ to the log file. The log file will be rolled
if the maximum file size is exceeded or if the file is older than the
maximum age.
call - seq : write ( event ) Write the given _event_ to the log file . The log file will be rolled if the maximum file size is exceeded or if the file is older than the maximum age .
def write( event )
      str = event.instance_of?(::Logging::LogEvent) ?
            @layout.format(event) : event.to_s
      return if str.empty?
      check_logfile
      super(str)
      if roll_required?(str)
        return roll unless @lockfile
        @lockfile.lock {
          check_logfile
          roll if roll_required?
        }
      end
    end
def write ( event ) str = event . instance_of? ( :: Logging :: LogEvent ) ? @layout . format ( event ) : event . to_s return if str . empty? check_logfile super ( str ) if roll_required? ( str ) return roll unless @lockfile @lockfile . lock { check_logfile roll if roll_required? } end end
call-seq:
write( event )
call - seq : write ( event )
event