Class: Alephant::Logger::CloudWatch
- Inherits:
-
Object
- Object
- Alephant::Logger::CloudWatch
- Defined in:
- lib/alephant/logger/cloudwatch.rb
Instance Method Summary collapse
-
#initialize(opts) ⇒ CloudWatch
constructor
A new instance of CloudWatch.
- #metric(name, opts) ⇒ Object
Constructor Details
#initialize(opts) ⇒ CloudWatch
Returns a new instance of CloudWatch.
6 7 8 9 |
# File 'lib/alephant/logger/cloudwatch.rb', line 6 def initialize(opts) @cloudwatch = AWS::CloudWatch.new @defaults = process_defaults opts end |
Instance Method Details
#metric(name, opts) ⇒ Object
11 12 13 14 |
# File 'lib/alephant/logger/cloudwatch.rb', line 11 def metric(name, opts) signature = [name] + opts.values_at(:value, :unit, :dimensions) send_metric(*signature) end |