Refactor logging extensions for extension members#19
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// <param name="logger">The logger instance.</param> | ||
| /// <param name="message">The log message.</param> | ||
| /// <example> | ||
| /// <code> | ||
| /// logger.Verbose("Method entry: ProcessOrder"); | ||
| /// </code> | ||
| /// </example> | ||
| public static void Verbose(this ILogger logger, string? message) | ||
| extension(ILogger logger) | ||
| { |
There was a problem hiding this comment.
Extension declaration syntax breaks build
All logging helpers were rewritten using extension(ILogger logger) blocks and instance methods (e.g., Verbose(...) here), but the project still sets <LangVersion>default and targets netstandard2.0/net8/net9/net10, which only support classic static extension methods with a this ILogger parameter. With the current language version this syntax is not recognized and logger has no definition, so the library no longer compiles for any target (dotnet build will fail before tests run). Consider reverting to standard extension methods or enabling a preview language that supports extension declarations.
Useful? React with 👍 / 👎.
Summary
Testing