Update Assessment Nuget to Enable Logging (#1215)

* wip

* updated nuget package

* removed unused nuget

* updated assessment nuget to add logging

* added logs filepath'

* updated assessment nuget

* updated nuget
This commit is contained in:
Christopher Suh
2021-06-15 10:49:20 -07:00
committed by GitHub
parent 993b094db9
commit ae9ec03018
16 changed files with 4402 additions and 4 deletions

View File

@@ -15,10 +15,12 @@ using Microsoft.SqlTools.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.Connection;
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
using Microsoft.SqlTools.Utility;
using Microsoft.SqlTools.ServiceLayer.Hosting;
using Microsoft.SqlTools.ServiceLayer.Migration.Contracts;
using Microsoft.SqlTools.ServiceLayer.SqlAssessment;
using Microsoft.Win32.SafeHandles;
using Microsoft.SqlServer.DataCollection.Common;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
@@ -186,6 +188,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Migration
internal async Task<List<MigrationAssessmentInfo>> GetAssessmentItems(SqlObjectLocator target, string connectionString)
{
SqlAssessmentConfiguration.EnableLocalLogging = true;
SqlAssessmentConfiguration.EnableReportCreation = true;
SqlAssessmentConfiguration.AssessmentReportAndLogsRootFolderPath = Path.GetDirectoryName(Logger.LogFileFullPath);
DmaEngine engine = new DmaEngine(connectionString);
var assessmentResults = await engine.GetTargetAssessmentResultsList();