]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4557 Move log to Rails code (java_facade.generateServerId is called on page...
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 28 Jul 2014 13:14:21 +0000 (15:14 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 28 Jul 2014 13:29:39 +0000 (15:29 +0200)
server/sonar-server/src/main/java/org/sonar/server/platform/ServerIdGenerator.java
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/server_id_configuration_controller.rb

index bac0c8aae55a7b55b98ada1eeba453590a34d3a3..b5fe7007e9bdcda2565fbfea1bc89360b5024a7a 100644 (file)
@@ -70,7 +70,6 @@ public class ServerIdGenerator {
         id = toId(organisation, inetAddress);
       }
     }
-    LOG.info("Generated new server ID=" + id);
     return id;
   }
 
index 68d7b3dc97c20a1e8c396793b0ffed105acac6ce..4a9c047dfe59120ee5b7818dbf3ce086e531096c 100644 (file)
@@ -33,7 +33,7 @@ class ServerIdConfigurationController < ApplicationController
     @address = Property.value(PROPERTY_IP_ADDRESS) || ''
     @valid_addresses = java_facade.getValidInetAddressesForServerId()
     @bad_id = false
-    
+
     if @server_id.present?
       id = java_facade.generateServerId(@organisation, @address)
       @bad_id = (@server_id != id)
@@ -54,6 +54,7 @@ class ServerIdConfigurationController < ApplicationController
     else
       id = java_facade.generateServerId(organisation, ip_address)
       if id
+        Java::OrgSlf4j::LoggerFactory::getLogger('root').info("Generated new server ID=" + id);
         # Success!
         Property.set(PROPERTY_SERVER_ID, id)
       else
@@ -62,7 +63,7 @@ class ServerIdConfigurationController < ApplicationController
         flash[:error] = Api::Utils.message('server_id_configuration.generation_error')
       end
     end
-    
+
     redirect_to :action => 'index'
   end
 end