changeset 51:39a530910a6a

improve logging in case windbg tools weren't found
author Evgeniy.Koshkin
date Thu, 14 Nov 2013 13:48:10 +0400
parents 89220bce43c8
children f4a7cca29e5f
files agent/src/jetbrains/buildServer/symbols/FileUrlProviderFactory.java agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java
diffstat 2 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/jetbrains/buildServer/symbols/FileUrlProviderFactory.java	Wed Nov 13 21:26:53 2013 +0400
+++ b/agent/src/jetbrains/buildServer/symbols/FileUrlProviderFactory.java	Thu Nov 14 13:48:10 2013 +0400
@@ -34,9 +34,9 @@
   public static FileUrlProvider getProvider(@NotNull AgentRunningBuild build, @NotNull BuildProgressLogger buildLogger){
     String sourceServerUrlPrefix = build.getSharedConfigParameters().get(SymbolsConstants.SOURCES_SERVER_URL_PARAM_NAME);
     if(sourceServerUrlPrefix == null){
-      final String message = String.format("%s configuration parameter was not set. ", SymbolsConstants.SOURCES_SERVER_URL_PARAM_NAME);
-      LOG.warn(message);
-      buildLogger.warning(message);
+      final String message = String.format("%s configuration parameter was not set. No symbol and source indexing will be performed.", SymbolsConstants.SOURCES_SERVER_URL_PARAM_NAME);
+      LOG.error(message);
+      buildLogger.error(message);
       return null;
     }
     final String message = String.format("Using Sources Server URL %s", sourceServerUrlPrefix);
--- a/agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java	Wed Nov 13 21:26:53 2013 +0400
+++ b/agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java	Thu Nov 14 13:48:10 2013 +0400
@@ -46,7 +46,7 @@
       @Override
       public void buildStarted(@NotNull final AgentRunningBuild runningBuild) {
         if(runningBuild.getBuildFeaturesOfType(SymbolsConstants.BUILD_FEATURE_TYPE).isEmpty()){
-          LOG.debug(SymbolsConstants.BUILD_FEATURE_TYPE + " build feature disabled. No indexing performed.");
+          LOG.debug(SymbolsConstants.BUILD_FEATURE_TYPE + " build feature disabled. No indexing will be performed.");
           return;
         }
         LOG.debug(SymbolsConstants.BUILD_FEATURE_TYPE + " build feature enabled.");
@@ -55,12 +55,13 @@
         myBuildTempDirectory = runningBuild.getBuildTempDirectory();
 
         mySrcSrvHomeDir = WinDbgToolsHelper.getSrcSrvHomeDir(runningBuild);
-        if(mySrcSrvHomeDir == null) {
-          myProgressLogger.error("Failed to find Source Server tools home directory.");
-          LOG.error("Failed to find Source Server tools home directory.");
+        if (mySrcSrvHomeDir == null) {
+          LOG.error("Failed to find Source Server tools home directory. No symbol and source indexing will be performed.");
+          myProgressLogger.error("Failed to find Source Server tools home directory. No symbol and source indexing will be performed.");
+          return;
         }
-        else
-          myProgressLogger.message("Source Server tools home directory located. " + mySrcSrvHomeDir.getAbsolutePath());
+        LOG.debug("Source Server tools home directory located. " + mySrcSrvHomeDir.getAbsolutePath());
+        myProgressLogger.message("Source Server tools home directory located. " + mySrcSrvHomeDir.getAbsolutePath());
 
         myFileUrlProvider = FileUrlProviderFactory.getProvider(runningBuild, myProgressLogger);
       }
@@ -97,7 +98,7 @@
   public void afterCollectingFiles(@NotNull List<ArtifactsCollection> artifacts) {
     super.afterCollectingFiles(artifacts);
     if(!isIndexingApplicable()){
-      LOG.debug("Indexing skipped.");
+      LOG.debug("Symbols and sources indexing skipped.");
       return;
     }