Skip to content

Commit ff71fa1

Browse files
authored
💡feat(TfsNodeStructureTool): Enhance logging for node migration process (#2654)
💡 (TfsNodeStructureTool.cs): add detailed logging for node migration process Enhance logging to provide more detailed information about the node migration process. This includes logging the state of the ReplicateAllExistingNodes option and whether node migration is skipped or executed. The change improves traceability and debugging by providing clear insights into the execution flow and decisions made during the process.
2 parents 12b5ee4 + 44f8a5e commit ff71fa1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎src/MigrationTools.Clients.TfsObjectModel/Tools/TfsNodeStructureTool.cs‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,20 @@ private Dictionary<string, string> GetMaps(TfsNodeStructureType nodeStructureTyp
276276

277277
public void ProcessorExecutionBegin(TfsProcessor processor)
278278
{
279+
Log.LogDebug("TfsNodeStrictureTool: Enabled={enabled}", Options.Enabled);
279280
if (Options.Enabled)
280281
{
281-
Log.LogInformation("Migrating all Nodes before the Processor run.");
282282
EntryForProcessorType(processor);
283+
Log.LogDebug("TfsNodeStrictureTool: ReplicateAllExistingNodes={ReplicateAllExistingNodes}", Options.ReplicateAllExistingNodes);
283284
if (Options.ReplicateAllExistingNodes)
284285
{
286+
Log.LogInformation("Migrating all Nodes before the Processor run.");
285287
MigrateAllNodeStructures();
286-
}
287-
RefreshForProcessorType(processor);
288+
RefreshForProcessorType(processor);
289+
} else
290+
{
291+
Log.LogInformation("SKIP: Migrating all Nodes before the Processor run.");
292+
}
288293
}
289294
else
290295
{
@@ -403,7 +408,7 @@ private static string GetUserFriendlyPath(string systemNodePath)
403408

404409
private void MigrateAllNodeStructures()
405410
{
406-
Log.LogDebug("NodeStructureEnricher.MigrateAllNodeStructures(@{areaMaps}, @{iterationMaps})", Options.Areas, Options.Iterations);
411+
Log.LogDebug("NodeStructureEnricher.MigrateAllNodeStructures({@areaMaps}, {@iterationMaps})", Options.Areas, Options.Iterations);
407412
//////////////////////////////////////////////////
408413
ProcessCommonStructure(_sourceLanguageMaps.AreaPath, _targetLanguageMaps.AreaPath, _targetProjectName, TfsNodeStructureType.Area);
409414
//////////////////////////////////////////////////

0 commit comments

Comments
 (0)