Sha256: af3c23db17bbda7ec91b381f3912589aebe511eb33359c7adf4359d5b8397411
Contents?: true
Size: 924 Bytes
Versions: 5
Compression:
Stored size: 924 Bytes
Contents
# frozen_string_literal: true module R7Insight # Rapid7 Insight Platform Logging Host module Host def self.new(token, region, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp_port, use_data_endpoint) R7Insight::Host::CONNECTION.new(token, region, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp_port, use_data_endpoint) end # Log formatter module InstanceMethods def formatter proc do |severity, datetime, _, msg| "#{datetime} #{format_message(msg, severity)}" end end def format_message(message_in, severity) message_in = message_in.inspect unless message_in.is_a?(String) "severity=#{severity}, #{message_in.lstrip}" end end end end require File.join(File.dirname(__FILE__), 'host', 'connection')
Version data entries
5 entries across 5 versions & 1 rubygems