Class: Meteorlog::Exporter
- Inherits:
-
Object
- Object
- Meteorlog::Exporter
- Defined in:
- lib/meteorlog/exporter.rb
Class Method Summary collapse
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(cloud_watch_logs, options = {}) ⇒ Exporter
constructor
of class methods.
Constructor Details
#initialize(cloud_watch_logs, options = {}) ⇒ Exporter
of class methods
8 9 10 11 |
# File 'lib/meteorlog/exporter.rb', line 8 def initialize(cloud_watch_logs, = {}) @cloud_watch_logs = cloud_watch_logs @options = end |
Class Method Details
.export(cloud_watch_logs, opts = {}) ⇒ Object
3 4 5 |
# File 'lib/meteorlog/exporter.rb', line 3 def export(cloud_watch_logs, opts = {}) self.new(cloud_watch_logs, opts).export end |
Instance Method Details
#export ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/meteorlog/exporter.rb', line 13 def export result = {} log_groups = @cloud_watch_logs.describe_log_groups.each.inject([]) {|r, i| r + i.log_groups } log_groups.each do |log_group| export_log_graoup(log_group, result) end return result end |