Class: CloudWatchLogger::Client::AWS_SDK

Inherits:
Object
  • Object
show all
Includes:
InstanceMethods
Defined in:
lib/cloudwatchlogger/client/aws_sdk.rb,
lib/cloudwatchlogger/client/aws_sdk/threaded.rb

Defined Under Namespace

Classes: DeliveryThread, DeliveryThreadManager

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from InstanceMethods

#default_log_stream_name, #epoch_from, #formatter, #masher, #masherize_key, #massage_message, #setup_credentials, #setup_log_group_name, #setup_log_stream_name

Constructor Details

#initialize(credentials, log_group_name, log_stream_name, opts = {}) ⇒ AWS_SDK

Returns a new instance of AWS_SDK.



10
11
12
13
14
15
# File 'lib/cloudwatchlogger/client/aws_sdk.rb', line 10

def initialize(credentials, log_group_name, log_stream_name, opts = {})
  setup_credentials(credentials)
  setup_log_group_name(log_group_name)
  setup_log_stream_name(log_stream_name)
  @deliverer = CloudWatchLogger::Client::AWS_SDK::DeliveryThreadManager.new(@credentials, @log_group_name, @log_stream_name, opts)
end

Instance Attribute Details

#delivererObject (readonly)

Returns the value of attribute deliverer.



8
9
10
# File 'lib/cloudwatchlogger/client/aws_sdk.rb', line 8

def deliverer
  @deliverer
end

#input_uriObject (readonly)

Returns the value of attribute input_uri.



8
9
10
# File 'lib/cloudwatchlogger/client/aws_sdk.rb', line 8

def input_uri
  @input_uri
end

Instance Method Details

#closeObject



21
22
23
# File 'lib/cloudwatchlogger/client/aws_sdk.rb', line 21

def close
  nil
end

#write(message) ⇒ Object



17
18
19
# File 'lib/cloudwatchlogger/client/aws_sdk.rb', line 17

def write(message)
  @deliverer.deliver(message)
end