Sha256: bd7398167d5d89a6fd648bebfeab2efded5ab7bc01a00e92e947ad6500f0f41a

Contents?: true

Size: 870 Bytes

Versions: 3

Compression:

Stored size: 870 Bytes

Contents

#!/usr/bin/env ruby
# coding: utf-8

#
# Logentries Ruby monitoring agent
# Copyright 2010,2011 Logentries, Jlizard
# Mark Lacomber <marklacomber@gmail.com>
#

module Le
  module Host
    
    # Creates a new Logentries host, based on a user-key and location of destination file on logentries,
    # both must be provided correctly for a connection to be made.

    def self.new(key, location)

      Le::Host::HTTPS.new(key, location)
      
    end
  
    module HelperMethods
 
      def formatter
	proc do |severity, datetime, progname, msg|
	  message = "#{datetime} "
          message << format_message(msg, severity)
        end
      end
  
      def format_message(msg_in, severity)
	msg_out = ""
	msg_out << "severity=#{severity}, "

	msg_out << msg_in
        
	msg_out
      end
    end
  end
end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
le-1.6 ./lib/le/host.rb
le-1.4.5 ./lib/le/host.rb
le-1.5 ./lib/le/host.rb