Skip to content

Commit

Permalink
Merge pull request #2203 from OmniSharp/logs-project-manager
Browse files Browse the repository at this point in the history
Improved logging in project manager
  • Loading branch information
filipw committed Aug 3, 2021
2 parents e55adb0 + bc5aee4 commit 2c3694f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/OmniSharp.MSBuild/ProjectManager.cs
Expand Up @@ -185,7 +185,7 @@ private async Task ProcessLoopAsync(CancellationToken cancellationToken)
}
catch (Exception ex)
{
_logger.LogError($"Error occurred while processing project updates: {ex}");
_logger.LogError(ex, "Error occurred while processing project updates");
}
}
}
Expand Down Expand Up @@ -329,7 +329,7 @@ private void ProcessQueue(CancellationToken cancellationToken)
}
catch (Exception ex)
{
_logger.LogWarning($"Failed to load project file '{projectFilePath}'.", ex);
_logger.LogError(ex, "Failed to load project file '{projectFilePath}'.");
_eventEmitter.Error(ex, fileName: projectFilePath);
return (null, null);
}
Expand Down Expand Up @@ -744,7 +744,7 @@ private void UpdateProjectReferences(Project project, ImmutableArray<string> pro
}
else
{
_logger.LogDebug($"failed to get project info:{project.FilePath}");
_logger.LogWarning($"Failed to get project info: {project.FilePath}");
}

var projectReference = new ProjectReference(referencedProject.Id, aliases);
Expand Down Expand Up @@ -807,13 +807,13 @@ private void UpdateReferences(Project project, ImmutableArray<string> projectRef
if (!string.IsNullOrEmpty(aliases))
{
reference = reference.WithAliases(aliases.Split(new char[]{','},StringSplitOptions.RemoveEmptyEntries).Select(a => a.Trim()));
_logger.LogDebug($"setting aliases: {referencePath}, {aliases} ");
_logger.LogDebug($"Setting aliases: {referencePath}, {aliases} ");
}
}
}
else
{
_logger.LogDebug($"failed to get project info:{project.FilePath}");
_logger.LogDebug($"Failed to get project info: {project.FilePath}");
}
_logger.LogDebug($"Adding reference '{referencePath}' to '{project.Name}'.");
_workspace.AddMetadataReference(project.Id, reference);
Expand Down

0 comments on commit 2c3694f

Please sign in to comment.