Skip to content

Make the output of feature-flag-list readable#5457

Merged
premun merged 2 commits intodotnet:mainfrom
premun:prvysoky/flag-list
Nov 10, 2025
Merged

Make the output of feature-flag-list readable#5457
premun merged 2 commits intodotnet:mainfrom
premun:prvysoky/flag-list

Conversation

@premun
Copy link
Copy Markdown
Member

@premun premun commented Nov 10, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 10, 2025 11:10
Copy link
Copy Markdown
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 updates the logging configuration for the ProductConstructionService CLI tool to use a custom compact console formatter and changes the FeatureFlagListOperation to use direct console output instead of structured logging for informational messages.

  • Adds CompactConsoleLoggerFormatter to the CLI logging setup (matching patterns used in other tools in the repository)
  • Replaces structured logging calls (_logger.LogInformation) with direct Console.WriteLine calls in the feature flag listing operation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tools/ProductConstructionService.Cli/Options/Options.cs Adds compact console logger formatter to the service registration
tools/ProductConstructionService.Cli/Operations/FeatureFlagListOperation.cs Replaces structured logging with Console.WriteLine for informational output
Comments suppressed due to low confidence (1)

tools/ProductConstructionService.Cli/Operations/FeatureFlagListOperation.cs:14

  • The _logger field is still injected and stored but only used for error logging (lines 51-52 and 61-62). Since other operations in the CLI (like FeatureFlagGetOperation and FeatureFlagSetOperation) use structured logging consistently for both informational and error messages, this creates an inconsistent logging pattern. Consider either: (1) keeping structured logging for all messages to maintain consistency with other operations, or (2) if Console.WriteLine is the preferred approach, update all CLI operations consistently and remove the logger dependency where it's no longer needed.
    private readonly ILogger<FeatureFlagListOperation> _logger;

@premun premun merged commit 80afed1 into dotnet:main Nov 10, 2025
14 of 15 checks passed
@premun premun deleted the prvysoky/flag-list branch November 10, 2025 13:19
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.

3 participants