Sha256: cf194b43c59aa079fbad630a3dab64050229bbf4f222c8762b9e94365aa4e17a

Contents?: true

Size: 821 Bytes

Versions: 4

Compression:

Stored size: 821 Bytes

Contents

module OboeHeroku
  module Loading

    def self.configure
      # OBOE_TRACE_NEVER   0
      # OBOE_TRACE_ALWAYS  1
      # OBOE_TRACE_THROUGH 2

      if defined?(Oboe::Config)

        case Oboe::Config[:tracing_mode].to_s.downcase.to_sym
        when :never
          # OBOE_TRACE_NEVER
          Oboe::Context.setTracingMode(0)
        when :always
          # OBOE_TRACE_ALWAYS
          Oboe::Context.setTracingMode(1)
        else
          # OBOE_TRACE_ALWAYS
          Oboe::Context.setTracingMode(1)

          # We support 'never' or 'always' on Heroku.  If :tracing_mode is
          # neither of these, default to always
          Oboe::Config[:tracing_mode] = 'always'
        end
      else
        # OBOE_TRACE_ALWAYS
        Oboe::Context.setTracingMode(1)
      end
    end # self.configure

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
oboe-heroku-0.9.18.1 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.17.8 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.17.4 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.17.3 lib/oboe-heroku/loading.rb