Top Level Namespace

Defined Under Namespace

Modules: Run

Constant Summary collapse

CONF_FILE =
'/etc/cf-graylog2.conf'

Instance Method Summary collapse

Instance Method Details

#stfuObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/cloudfoundry-graylog2.rb', line 10

def stfu
    begin
      orig_stderr = $stderr.clone
      $stderr.reopen File.new('/dev/null', 'w')
      retval = yield
    rescue Exception => e
      $stderr.reopen orig_stderr
      raise e
    ensure
      $stderr.reopen orig_stderr
    end
    retval
end