Skip to content

Commit

Permalink
Merge pull request cake-build#3682 from gitfool/gh3681
Browse files Browse the repository at this point in the history
GH3681: Move `ScriptAssemblyResolver` logging to debug/diagnostic level
  • Loading branch information
devlead authored Nov 8, 2021
2 parents 8ddb84c + 64cd487 commit 2c84363
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Cake/Infrastructure/Scripting/ScriptAssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private Assembly AssemblyResolve(object sender, ResolveEventArgs args)
return null;
}

_log.Verbose($"Resolving assembly '{fullName}' using runtime installed at '{RuntimeEnvironment.GetRuntimeDirectory()}'...");
_log.Debug($"Resolving assembly '{fullName}' using runtime installed at '{RuntimeEnvironment.GetRuntimeDirectory()}'...");
return AssemblyResolve(assemblyName);
}

Expand All @@ -76,12 +76,12 @@ private Assembly AssemblyResolve(AssemblyName assemblyName)
}
catch (Exception ex)
{
_log.Verbose($"Exception occurred while resolving assembly {shortName}: {ex.Message}");
_log.Debug($"Exception occurred while resolving assembly {shortName}: {ex.Message}");
}

if (assembly != null)
{
_log.Verbose($"Assembly {shortName} resolved as '{assembly.FullName}' (file location: '{assembly.Location}')");
_log.Debug($"Assembly {shortName} resolved as '{assembly.FullName}' (file location: '{assembly.Location}')");
return assembly;
}

Expand All @@ -92,12 +92,12 @@ private Assembly AssemblyResolve(AssemblyName assemblyName)
{
assemblyName.Name = shortName.Remove(shortName.Length - AssemblyResourcesExtension.Length);

_log.Verbose($"Trying to resolve assembly {shortName} as '{assemblyName.FullName}'...");
_log.Debug($"Trying to resolve assembly {shortName} as '{assemblyName.FullName}'...");
return AssemblyResolve(assemblyName);
}
}

_log.Verbose($"Assembly '{fullName}' not resolved");
_log.Debug($"Assembly '{fullName}' not resolved");
return null;
}

Expand Down

0 comments on commit 2c84363

Please sign in to comment.