Skip to content

Conversation

@matt-goldman
Copy link
Owner

Summary

This commit introduces logging functionality across multiple classes, replacing console output with ILogger calls. Key changes include:

  • Updated CloneTemplateAsync in ITemplateService to accept an optional ILogger parameter.
  • Modified DefaultContainerExtension and DefaultContainerRenderer to support logging.
  • Enhanced SafeContainerParser to log debug information during parsing.
  • Updated Blake.MarkdownParser.csproj to include a reference to Microsoft.Extensions.Logging.Abstractions.

These changes improve the maintainability and debuggability of the codebase.

🧷 This PR will be released as a preview by default.

To trigger a stable release:

  • Remove the preview label
  • Add the release label
  • Optionally add Semver-Minor or Semver-Major to control version bump

🏷️ Add labels to control release notes:

  • enhancement, bug, breaking-change, dependencies
  • Or use ignore-for-release to suppress it from notes

This commit introduces logging functionality across multiple classes, replacing console output with `ILogger` calls. Key changes include:

- Updated `CloneTemplateAsync` in `ITemplateService` to accept an optional `ILogger` parameter.
- Modified `DefaultContainerExtension` and `DefaultContainerRenderer` to support logging.
- Enhanced `SafeContainerParser` to log debug information during parsing.
- Updated `Blake.MarkdownParser.csproj` to include a reference to `Microsoft.Extensions.Logging.Abstractions`.

These changes improve the maintainability and debuggability of the codebase.
Copilot AI review requested due to automatic review settings August 3, 2025 00:26
@github-actions github-actions bot added preview Triggers a release of preview version of Nuget packages enhancement New feature or request dependencies Blake.BuildTools Blake.MarkdownParser labels Aug 3, 2025

This comment was marked as outdated.

matt-goldman and others added 2 commits August 3, 2025 10:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@matt-goldman matt-goldman requested a review from Copilot August 3, 2025 00:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces structured logging using Microsoft.Extensions.Logging to replace console output throughout the Blake markdown parser and build tools. The change improves maintainability and debuggability by providing a consistent logging framework with configurable log levels.

Key changes include:

  • Replaced Console.WriteLine statements with structured ILogger calls across multiple classes
  • Added optional ILogger parameters to methods and constructors throughout the codebase
  • Added Microsoft.Extensions.Logging.Abstractions package reference

Reviewed Changes

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

Show a summary per file
File Description
SafeContainerParser.cs Replaced console debug output with structured logging using LogDebug
MarkdigExtensions.cs Added optional logger parameter to SetupContainerRenderers method
DefaultContainerRenderer.cs Replaced Debug.WriteLine with structured logging and updated constructor
DefaultContainerExtension.cs Added logger parameter threading through parser and renderer instantiation
Blake.MarkdownParser.csproj Added Microsoft.Extensions.Logging.Abstractions package dependency
PluginLoader.cs Replaced console output with structured logging for plugin loading operations
TemplateService.cs Added logger parameter to CloneTemplateAsync and replaced console output
ITemplateService.cs Updated interface to include optional logger parameter
SiteGenerator.cs Updated method calls to pass logger parameters
SampleContentBuilder.cs Replaced console output with structured logging for sample content creation
ProjectFileBuilder.cs Replaced console output with structured logging for project file operations
Comments suppressed due to low confidence (1)

src/Blake.MarkdownParser/Blake.MarkdownParser.csproj:38

  • Microsoft.Extensions.Logging.Abstractions version 9.0.7 may not exist. As of January 2025, the latest version is 8.0.0. Please verify this version exists or use a confirmed available version.
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.7" />

matt-goldman and others added 3 commits August 3, 2025 10:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@matt-goldman matt-goldman added release Triggers a release of a production version of Nuget packages and removed preview Triggers a release of preview version of Nuget packages labels Aug 3, 2025
@matt-goldman matt-goldman merged commit 38706bf into main Aug 3, 2025
1 check passed
@matt-goldman matt-goldman deleted the fix-logging-in-container-parser branch August 3, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blake.BuildTools Blake.MarkdownParser dependencies enhancement New feature or request release Triggers a release of a production version of Nuget packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants