diff --git a/src/Microsoft.SqlTools.Migration/MigrationService.cs b/src/Microsoft.SqlTools.Migration/MigrationService.cs index 79bd940863..ac44343f0c 100644 --- a/src/Microsoft.SqlTools.Migration/MigrationService.cs +++ b/src/Microsoft.SqlTools.Migration/MigrationService.cs @@ -611,11 +611,15 @@ internal async Task HandleGetArmTemplateRequest( { try { + Logger.Verbose("request received in toolsservice"); ProvisioningScriptServiceProvider provider = new ProvisioningScriptServiceProvider(); string searchPattern = $"*{targetType}-Baseline*.json"; string skuRecommendationReportFilePath = Directory.GetFiles(SqlAssessmentConfiguration.ReportsAndLogsRootFolderPath, searchPattern).FirstOrDefault(); + Logger.Verbose($"Logging report file path -- {skuRecommendationReportFilePath}"); List recommendations = ExtractSkuRecommendationReportAction.ExtractSkuRecommendationsFromReport(skuRecommendationReportFilePath); + Logger.Verbose($"recommendations generated-- {recommendations.Count}"); List templateList = provider.GenerateProvisioningScript(recommendations); + Logger.Verbose($"ARM templates generated-- {templateList.Count}"); List armTemplates = new List(); foreach (SqlArmTemplate template in templateList) { @@ -624,13 +628,17 @@ internal async Task HandleGetArmTemplateRequest( Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, Culture = CultureInfo.InvariantCulture } ); + Logger.Verbose($"Logging ARM templates -- {jsonOutput}"); armTemplates.Add(jsonOutput); } + Logger.Verbose($"sending response -- {armTemplates.Count}"); await requestContext.SendResult(armTemplates); } catch (Exception e) { await requestContext.SendError(e.ToString()); + Logger.Verbose($"inside catch block -- "); + await requestContext.SendError(e.ToString()); } }