Skip to content

Promote: adopt Microsoft.Extensions.Logging logging model (3.7)#383

Merged
ptr727 merged 2 commits into
mainfrom
develop
Jul 10, 2026
Merged

Promote: adopt Microsoft.Extensions.Logging logging model (3.7)#383
ptr727 merged 2 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Promotes the 3.7 release from develop to main.

Contents

Release impact: merging publishes the stable 3.7 package to NuGet (breaking API changes: LogOptions.Logger removed, Extensions renamed). No issues to close.

🤖 Generated with Claude Code

ptr727 added 2 commits July 9, 2026 16:51
Replace the Serilog-typed LogOptions.Logger with an injectable Microsoft.Extensions.Logging factory (SetFactory/TrySetFactory), source-generated [LoggerMessage] logging in FileEx/Download, a Serilog-wired Sandbox, and an AwesomeAssertions test suite. Ships as 3.7.
Remove the accidentally-committed coverage report and gitignore coverage output so it cannot recur. Tooling-only; no shipped inputs change.
Copilot AI review requested due to automatic review settings July 9, 2026 23:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Promotes the 3.7 release to main, updating the library to use the backend-agnostic Microsoft.Extensions.Logging model (injectable ILoggerFactory + source-generated logging), and aligning tests/tooling/docs with the release.

Changes:

  • Bump release version to 3.7 and update README/HISTORY release notes accordingly.
  • Replace Serilog-coupled library logging with Microsoft.Extensions.Logging.Abstractions (LogOptions factory model, FileEx/Download logging via [LoggerMessage]).
  • Migrate tests to AwesomeAssertions and add coverage/artifact hygiene (codecov.yml, .gitignore).

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
version.json Bumps the NBGV version floor from 3.6 to 3.7.
Directory.Packages.props Adds central package versions for AwesomeAssertions and Microsoft.Extensions.Logging.Abstractions; adds Serilog.Extensions.Logging for Sandbox.
Utilities/Utilities.csproj Drops Serilog dependency; adds Microsoft.Extensions.Logging.Abstractions; adds InternalsVisibleTo for tests.
Utilities/LogOptions.cs Introduces global ILoggerFactory configuration (SetFactory/TrySetFactory) and logger creation helpers.
Utilities/FileEx.cs Switches FileEx logging to ILogger with source-generated message helpers.
Utilities/Download.cs Switches Download logging to ILogger with shared exception handling.
Utilities/Extensions.cs Renames compression extensions container to CompressExtensions and introduces internal logging extensions + [LoggerMessage] declarations.
Sandbox/Sandbox.csproj Adds Serilog.Extensions.Logging and sets explicit RootNamespace for the example app.
Sandbox/Program.cs Wires Serilog into the library via LogOptions.SetFactory(...) and ensures flush on exit.
Sandbox/LoggerFactory.cs Adds Serilog-to-Microsoft.Extensions.Logging factory wrapper for Sandbox.
UtilitiesTests/UtilitiesTests.csproj Migrates test dependencies from Serilog to AwesomeAssertions + Logging.Abstractions.
UtilitiesTests/GlobalUsings.cs Adds global using for AwesomeAssertions.
UtilitiesTests/StringHistoryTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/StringCompressionTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/StringCompressionAsyncTests.cs Migrates assertions to AwesomeAssertions (including async exception assertions).
UtilitiesTests/FormatTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/FileTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/FileExAsyncTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/ExtensionsTests.cs Updates logger tests to use Microsoft.Extensions.Logging + AwesomeAssertions.
UtilitiesTests/DownloadTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/DownloadAsyncTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/ConsoleTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/CommandLineTests.cs Migrates assertions to AwesomeAssertions.
UtilitiesTests/LogOptionsTests.cs Adds coverage for the new LogOptions factory behavior and logger creation.
README.md Updates “Release Notes” summary for 3.7.
HISTORY.md Adds detailed v3.7 release entry describing the breaking changes and logging migration.
codecov.yml Adds non-blocking Codecov configuration and excludes Sandbox from coverage.
.gitignore Ignores coverage/TestResults artifacts to prevent accidental commits.

Comment thread Utilities/LogOptions.cs
Comment thread Utilities/LogOptions.cs
Comment thread Utilities/LogOptions.cs
@ptr727
ptr727 merged commit cb1033f into main Jul 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants