lib/capistrano/datadog.rb in dogapi-1.4.2 vs lib/capistrano/datadog.rb in dogapi-1.4.3
- old
+ new
@@ -2,10 +2,11 @@
require "etc"
require "digest/md5"
require "socket"
require "time"
require "timeout"
+require "delegate"
require "dogapi"
# Monkeypatch capistrano to collect data about the tasks that it's running
module Capistrano
@@ -108,17 +109,13 @@
)
end
end
end
- class LogCapture
- def initialize(device)
- @device = device
- end
-
+ class LogCapture < SimpleDelegator
def puts(message)
Capistrano::Datadog::reporter.record_log message
- @device.puts message
+ __getobj__.puts message
end
end
end
Configuration.instance(:must_exist).load do