lib/ghtorrent/logging.rb
def loggerr
      @logger ||= proc do
        @logger_uniq ||= config(:logging_uniq)

        logger = if config(:logging_file).casecmp('stdout')
                   Logger.new(STDOUT)
                 elsif config(:logging_file).casecmp('stderr')
                   Logger.new(STDERR)
                 else
                   Logger.new(config(:logging_file))
                 end

        logger.level =
            case config(:logging_level).downcase
              when 'debug' then
                Logger::DEBUG
              when 'info' then
                Logger::INFO
              when 'warn' then
                Logger::WARN
              when 'error' then
                Logger::ERROR
              else
                Logger::INFO
            end

        logger.formatter = proc do |severity, time, progname, msg|
          if progname.nil? or progname.empty?
            progname = @logger_uniq
          end
          "#{severity}, #{time.iso8601}, #{progname} -- #{msg}\n"
        end
        logger
      end.call

      @logger
    end
def loggerr
      @logger ||= proc do
        @logger_uniq ||= config(:logging_uniq)

        logger = if config(:logging_file).casecmp('stdout')
                   Logger.new(STDOUT)
                 elsif config(:logging_file).casecmp('stderr')
                   Logger.new(STDERR)
                 else
                   Logger.new(config(:logging_file))
                 end

        logger.level =
            case config(:logging_level).downcase
              when 'debug' then
                Logger::DEBUG
              when 'info' then
                Logger::INFO
              when 'warn' then
                Logger::WARN
              when 'error' then
                Logger::ERROR
              else
                Logger::INFO
            end

        logger.formatter = proc do |severity, time, progname, msg|
          if progname.nil? or progname.empty?
            progname = @logger_uniq
          end
          "#{severity}, #{time.iso8601}, #{progname} -- #{msg}\n"
        end
        logger
      end.call

      @logger
    end
Default logger