Conversation
Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
…ve related documentation Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
…e fixture Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the logging framework to support global configuration and improves documentation across the project. The changes introduce a flexible logging system that allows both global static logger configuration and per-instance logger injection.
Changes:
- Introduced a new global logging configuration system via
LogOptionsclass with thread-safe static logger factory and fallback logger - Added comprehensive test coverage for the new logging framework with 150+ lines of xUnit tests
- Upgraded from xUnit v2 to xUnit v3 and improved test naming to follow MethodName_Scenario_ExpectedBehavior convention
- Enhanced documentation with new CODESTYLE.md and AGENTS.md files, and expanded copilot instructions
- Improved code organization by reordering members to follow StyleCop-like conventions and converting #pragma suppressions to attributes
- Removed redundant Husky build targets from all projects and SourceLink from non-packaged projects (Console, CodeGen)
- Fixed resilience handler logic to properly handle both exceptions and non-success status codes
Reviewed changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Library/LogOptions.cs | New global logging configuration with thread-safe static factory and logger properties |
| Library/Options.cs | New options class for per-instance logger configuration |
| Library/Library.cs | Refactored to use new LogOptions system; added StaticTemplateLibrary class |
| Library/Extensions.cs | Changed extension method visibility from public to internal |
| Library/Library.csproj | Removed Husky build target (now managed via dotnet tool) |
| Tests/Tests.csproj | Upgraded from xUnit v2.9.3 to xUnit v3.2.2 |
| Tests/LoggingTests.cs | New comprehensive test suite for logging framework (205 lines) |
| Tests/SampleTest.cs | Improved test naming and added xUnit v3 TestContext cancellation token usage |
| Tests/Fixture.cs | Added AssemblyFixture and sequential collection support for shared test state |
| Tests/GlobalUsings.cs | Removed unused System.IO import |
| Tests/.editorconfig | Added suppressions for missing XML docs and CA1515 |
| Console/Program.cs | Updated to use new LogOptions.SetFactory for global logger configuration |
| Console/LoggerFactory.cs | Reordered members and added CreateLoggerFactory method |
| Console/CommandLine.cs | Reordered members (fields to top, nested Options class to bottom) |
| Console/Extensions.cs | Reordered LogOverride class to bottom, removed redundant suppressions |
| Console/GlobalUsings.cs | Added Microsoft.Extensions.Logging and Serilog.Events |
| Console/.editorconfig | Updated comment from TODO to descriptive explanation |
| Console/Console.csproj | Removed Husky target and SourceLink package |
| CodeGen/HttpClientFactory.cs | Fixed ShouldHandle to handle exceptions; reordered members |
| CodeGen/CommandLine.cs | Reordered members to follow conventions |
| CodeGen/CodeGen.csproj | Removed Husky target and SourceLink package |
| CodeGen/.editorconfig | Updated comment from TODO to descriptive explanation |
| Benchmarks/SampleBenchmark.cs | Converted #pragma suppressions to SuppressMessage attributes |
| Benchmarks/.editorconfig | Added suppression for missing XML docs |
| CODESTYLE.md | New comprehensive style guide (296 lines) |
| AGENTS.md | New AI agent instructions (61 lines) |
| .github/copilot-instructions.md | Enhanced with additional documentation and reference links |
| .editorconfig | Whitespace cleanup |
| .config/dotnet-tools.json | Added newline at end of file |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve the logging framework with global configuration options and refactor the code structure. Enhance documentation across multiple files and add agent instructions for better clarity.