Skip to content

Commit

Permalink
Cleanup logging under RestoreTask.
Browse files Browse the repository at this point in the history
See related: NuGet/Home#10383
  • Loading branch information
KirillOsenkov committed Dec 31, 2020
1 parent 0effca7 commit 7a29981
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 47 additions & 1 deletion src/StructuredLogger/Construction/MessageProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,59 @@ public void AddMessage(LazyFormattedBuildEventArgs args, string message)
{
node = node.GetOrCreateNodeWithName<Folder>("NotFound");
}
else if (message.StartsWith("PackageSignatureVerificationLog:"))
{
node = node.GetOrCreateNodeWithName<Folder>("PackageSignatureVerificationLog");
}
else if (message.StartsWith("Writing assets file to disk"))
{
node = node.GetOrCreateNodeWithName<Folder>("Assets file");
}
else if (message.StartsWith("Writing cache file to disk"))
{
node = node.GetOrCreateNodeWithName<Folder>("Cache file");
}
else if (message.StartsWith("Persisting dg to"))
{
node = node.GetOrCreateNodeWithName<Folder>("dg file");
}
else if (message.StartsWith("Generating MSBuild file"))
{
node = node.GetOrCreateNodeWithName<Folder>("MSBuild file");
}
else if (message.StartsWith("Lock not required"))
{
node = node.GetOrCreateNodeWithName<Folder>("Lock not required");
}
else if (message.StartsWith("Installing"))
{
node = node.GetOrCreateNodeWithName<Folder>("Installing");
}
else if (message.StartsWith("Restoring packages for"))
{
node = node.GetOrCreateNodeWithName<Folder>("Restoring packages for");
}
else if (message.StartsWith("Reading project file"))
{
node = node.GetOrCreateNodeWithName<Folder>("Reading project file");
}
else if (message.StartsWith("Scanning packages for"))
{
node = node.GetOrCreateNodeWithName<Folder>("Scanning packages for");
}
else if (message.StartsWith("Merging in runtimes"))
{
node = node.GetOrCreateNodeWithName<Folder>("Merging in runtimes");
}
else if (
message.StartsWith(Strings.RestoreTask_CheckingCompatibilityFor) ||
message.StartsWith(Strings.RestoreTask_CheckingCompatibilityOfPackages) ||
message.StartsWith(Strings.RestoreTask_AcquiringLockForTheInstallation) ||
message.StartsWith(Strings.RestoreTask_AcquiredLockForTheInstallation) ||
message.StartsWith(Strings.RestoreTask_CompletedInstallationOf) ||
message.StartsWith(Strings.RestoreTask_ResolvingConflictsFor)
message.StartsWith(Strings.RestoreTask_ResolvingConflictsFor) ||
message.StartsWith(Strings.RestoreTask_AllPackagesAndProjectsAreCompatible) ||
message.StartsWith(Strings.RestoreTask_Committing)
)
{
return;
Expand Down
2 changes: 2 additions & 0 deletions src/StructuredLogger/Strings/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ public static bool IsThereWasAConflictPrefix(string message)
public static string RestoreTask_AcquiredLockForTheInstallation = "Acquired lock for the installation";
public static string RestoreTask_CompletedInstallationOf = "Completed installation of";
public static string RestoreTask_ResolvingConflictsFor = "Resolving conflicts for";
public static string RestoreTask_AllPackagesAndProjectsAreCompatible = "All packages and projects are compatible";
public static string RestoreTask_Committing = "Committing restore";

public static string Evaluation => "Evaluation";
public static string Environment => "Environment";
Expand Down

0 comments on commit 7a29981

Please sign in to comment.