Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Nov 20, 2020
1 parent 64dcc75 commit b4ada5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/DiffEngineTray/Tracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ public TrackedMove AddMove(
}

var solutionName = SolutionDirectoryFinder.Find(key);

Log.Information("MoveAdded. Target:{target}, CanKill:{canKill}, ProcessId:{processId}, CommandLine:{commandLine}", target, canKill, processId, $"{exe} {arguments}");
return new TrackedMove(temp, key, exe, arguments, canKill, process, solutionName);
},
updateValueFactory: (key, existing) =>
Expand All @@ -131,6 +133,7 @@ public TrackedMove AddMove(
}

var solutionName = SolutionDirectoryFinder.Find(key);
Log.Information("MoveUpdated. Target:{target}, CanKill:{canKill}, ProcessId:{processId}, CommandLine:{commandLine}", target, canKill, processId, $"{exe} {arguments}");
return new TrackedMove(temp, key, exe, arguments, canKill, process, solutionName);
});
}
Expand All @@ -142,9 +145,14 @@ public TrackedDelete AddDelete(string file)
addValueFactory: key =>
{
var solutionName = SolutionDirectoryFinder.Find(key);
Log.Information("DeleteAdded. File:{file}", file, solutionName);
return new TrackedDelete(key, solutionName);
},
updateValueFactory: (s, existing) => existing);
updateValueFactory: (s, existing) =>
{
Log.Information("DeleteUpdated. File:{file}", file);
return existing;
});
}

public void Accept(TrackedDelete delete)
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649</NoWarn>
<Version>6.4.2</Version>
<Version>6.4.3</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>
Expand Down

0 comments on commit b4ada5f

Please sign in to comment.