require 'docuvator/initialize'

module Docuvator
  class CLI
    attr_reader :options
    def initialize
      @options = OpenStruct.new(
        verbose: false,
        debug: false,
      )
      parse_options
      determine_log_level
    end

    def process(file)
      Log.info "Processing #{file}"
      Splitter.new(file).split
    end

    def parse_options
      OptionParser.new do |opt|
        opt.version = VERSION
        opt.on "-v", "--verbose", "Verbose output (shows INFO level log statements)" do
          options.verbose = true
        end
        opt.on "-d", "--debug", "Debug output (shows DEBUG level log statements)" do
          options.debug = true
        end
      end.parse!
    end

    private

    def determine_log_level
      if options.debug
        Log.level = Logger::DEBUG
        Log.use_debug
      elsif options.verbose
        Log.level = Logger::INFO
      end
    end

  end
end

require 'docuvator/initialize'

module Docuvator
  class CLI
    attr_reader :options
    def initialize
      @options = OpenStruct.new(
        verbose: false,
        debug: false,
      )
      parse_options
      determine_log_level
    end

    def process(file)
      Log.info "Processing #{file}"
      Splitter.new(file).split
    end

    def parse_options
      OptionParser.new do |opt|
        opt.version = VERSION
        opt.on "-d", "--debug", "Debug output (shows DEBUG level log statements)" do
          options.debug = true
        end
      end.parse!
    end

    private

    def determine_log_level
      if options.debug
        Log.level = Logger::DEBUG
        Log.use_debug
      else
        Log.level = Logger::INFO
      end
    end

  end
end

Remove --verbose option, INFO log level is now default
Remove --verbose option, INFO log level is now default

Remove:
 * The --verbose option

Change:
 * Default log level to INFO
