Skip to content

Commit b2c6612

Browse files
author
OpenShift Bot
committed
Merge pull request openshift#1207 from smarterclayton/only_boot_rest_api_in_development
Merged by openshift-bot
2 parents 833e068 + 2cadebb commit b2c6612

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

console/config/initializers/rest_api.rb

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
RestApi::LogSubscriber.attach_to :active_resource
66

7-
begin
8-
info = RestApi.info
9-
Rails.logger.info "Connected to #{info.url} with version #{info.version}"
10-
rescue Exception => e
11-
puts e if Rails.env.development?
12-
Rails.logger.warn e.message
7+
unless Rails.env.production?
8+
begin
9+
info = RestApi.info
10+
Rails.logger.info "Connected to #{info.url} with version #{info.version}"
11+
rescue Exception => e
12+
puts e if Rails.env.development?
13+
Rails.logger.warn e.message
14+
end
1315
end
1416

1517
ActiveSupport.on_load(:action_controller) do

0 commit comments

Comments
 (0)