class Lumberjack::Device::SizeRollingLogFile

def next_archive_number # :nodoc:

:nodoc:
Calculate the next archive file name extension.
def next_archive_number # :nodoc:
  max = 0
  Dir.glob("#{path}.*").each do |filename|
    if /\.\d+\z/ =~ filename
      suffix = filename.split(".").last.to_i
      max = suffix if suffix > max
    end
  end
  max + 1
end