Sha256: bf191135b7f0e8a822bb8e77307aa0cb62b41fa8f7f5722131176be4c11d9744

Contents?: true

Size: 835 Bytes

Versions: 10

Compression:

Stored size: 835 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

10 entries across 10 versions & 1 rubygems

Version Path
oboe-heroku-0.9.16.1 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.15.6 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.14.4 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.13.3 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.12.2 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.11.0 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.10.0 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.9.0 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.8.5 lib/oboe-heroku/loading.rb
oboe-heroku-0.9.7.1 lib/oboe-heroku/loading.rb