Skip to content

Commit fb84196

Browse files
timoschillingestolfo
authored andcommitted
[RAILS] Fixed 03-expert.rb set tracer only in dev env (elastic#621)
The variable `tracer` is only defined in Rails development env, so we only can set them in that env.
1 parent 5536973 commit fb84196

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

elasticsearch-rails/lib/rails/templates/03-expert.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,8 @@ def index
270270
if Rails.env.development?
271271
tracer = ActiveSupport::Logger.new('log/elasticsearch.log')
272272
tracer.level = Logger::DEBUG
273+
Elasticsearch::Model.client.transport.tracer = tracer
273274
end
274-
275-
Elasticsearch::Model.client.transport.tracer = tracer
276275
CODE
277276

278277
git add: "config/initializers"

0 commit comments

Comments
 (0)