dotnet / dotnet/maui

[Essentials] Add logging

Open
#31,495 2 comments 0 reactions 0 assignees View on GitHub
proposal/open
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

### Description

In many places within the Essentials codebase, logging is currently handled using Debug.WriteLine. While this provides basic output, it lacks the flexibility and structure needed for modern diagnostics and telemetry.

There are also several TODO comments referencing the future use of a proper logging mechanism.

This proposal suggests replacing or augmenting existing Debug.WriteLine calls with a structured logging approach using ILogger.

### Public API Changes

TBD

### Intended Use-Case

This would allow developers to:

- Filter logs by severity
- Integrate with external logging providers (e.g., App Center, Azure Monitor)
- Enable better diagnostics across platforms

This change would improve maintainability, observability, and consistency across the Essentials library.

Contributor guide

Open the contributing guide

Research direction

Start by inventorying Debug.WriteLine calls and the TODO comments across the Essentials codebase, then review how ILogger could be introduced and configured across platforms. Define the public API and logging integration points before implementation. Done means the approach is agreed, logging is structured and severity-filterable, and the existing Essentials diagnostics are covered consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.