Sha256: 602759afaf636be77e7c0a276a7ab3520486de06598e66f0c42a334e7d910db3

Contents?: true

Size: 478 Bytes

Versions: 3

Compression:

Stored size: 478 Bytes

Contents

module DRbQS
  module Utils
    def create_logger(log_file, log_level)
      if log_file
        if IO === log_file
          log_output = log_file
        else
          log_output = FileName.create(log_file, :position => :middle, :directory => :parent, :type => :number)
        end
        logger = Logger.new(log_output)
        logger.level = log_level || Logger::ERROR
        return logger
      end
      return nil
    end
    module_function :create_logger
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
drbqs-0.0.13 lib/drbqs/utils.rb
drbqs-0.0.12 lib/drbqs/utils.rb
drbqs-0.0.11 lib/drbqs/utils.rb