Sha256: a6e544523e0d3790eb1f085eae91925592a29a0313efff5a5868a8417dcdad06

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

require File.join(File.dirname(__FILE__), 'le', 'host')

require 'logger'

module Le

 def self.new(token, local=false)

   self.checkParams(token)

   host = Le::Host.new(token, local)      
   logger = Logger.new(host)
   
   if host.respond_to?(:formatter)
	logger.formatter = host.formatter
   end

   logger  
 end

 def self.checkParams(token)
    # Check if the key is valid UUID format
    if (token =~ /\A(urn:uuid:)?[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12}\z/i) == nil
       puts "\nLE: It appears the LOGENTRIES_TOKEN you entered is invalid!\n"
    end
 end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
le-2.1 ./lib/le.rb