dotnet / dotnet/msbuild

[CI logging] Implement provider-independent CiLogger

Open
#14,650 0 comments 0 reactions 1 assignee Claimed by @VolPlita View on GitHub
Area: Logging User Experience
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Summary

Implement a provider-independent `CiLogger` on top of the reusable build-event snapshot model.

### Background and Motivation

CI providers use different output protocols, but the selection and processing of MSBuild diagnostics should remain consistent. Provider-neutral behavior should not be duplicated by every provider writer.

### Proposed Feature

Add an internal `CiLogger` that:

- consumes normalized diagnostic snapshots;
- selects and configures a provider writer;
- preserves the effective diagnostic severity and source context;
- serializes writes safely;
- keeps provider-output failures from failing the build;
- does not change Console Logger or Binary Logger behavior.

```text
BuildEventTracker
|
v
CiLogger
|
v
ICiProviderWriter
```

Keep the provider contract internal until multiple implementations demonstrate a need for public API.

Validation should use a fake provider writer to cover diagnostic conversion, ordering, concurrency, missing locations, warning promotion, and output failures.

### Alternative Designs

Provider-specific loggers could subscribe to MSBuild events independently, but that would duplicate diagnostic policy and failure handling. A shared `CiLogger` keeps provider implementations focused on output protocols.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.