Skip to content

Consider not logging full MSBuild output on a failed build #201

Open
@safesparrow

Description

@safesparrow

Is your feature request related to a problem? Please describe.
When MSBuild build fails, ProjInfo logs full MSBuild output which is very verbose.
It happens here:

logger.error (
Log.setMessageI $"Overall Build: {result.OverallResult:overallCode}, projects built {projectsBuilt:count} : {msbuildMessage:msbuildMessage} "
>> Log.addExn result.Exception
)

Sample beginning of output:

[14:18:37 INF] Ionide.ProjInfo.WorkspaceLoaderViaProjectGraph : Started loading projects 20 ["C:\\projekty\\fsharp\\fsharp_scripts\\.cache\\dotnet__fsharp\\9ae94bb9\\_\\tests\\service\\data\\CSharp_Analysis\\CSharp_Analysis.csproj", ...]
[14:18:39 ERR] Ionide.ProjInfo.WorkspaceLoaderViaProjectGraph : Overall Build: Failure, projects built 20 : Build started.
Static graph loaded in 1.055 seconds: 30 nodes, 72 edges
Project "CSharp_Analysis.csproj" (ResolveAssemblyReferencesDesignTime;ResolveProjectReferencesDesignTime;ResolvePackageDependenciesDesignTime;FindReferenceAssembliesForReferences;_GenerateCompileDependencyCache;_ComputeNonExistentFileProperty;BeforeBuild;BeforeCompile;CoreCompile target(s)):
...
(followed by a lot of MSBuild output)

Describe the solution you'd like
Better control over how much output is produced in case of failure.

Describe alternatives you've considered
Disable ProjInfo's logs through Serilog configuration - but that gets rid of useful log information.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions