Skip to content

CmdPal: Add CmdPalLogger, Provider, and extension method#46768

Merged
michaeljolley merged 1 commit intomainfrom
dev/mjolley/logging
Apr 4, 2026
Merged

CmdPal: Add CmdPalLogger, Provider, and extension method#46768
michaeljolley merged 1 commit intomainfrom
dev/mjolley/logging

Conversation

@michaeljolley
Copy link
Copy Markdown
Contributor

This pull request introduces a new logging infrastructure for the CmdPal module by integrating the Microsoft.Extensions.Logging (MEL) abstraction and routing all log output through the existing ManagedCommon.Logger. The changes add a custom logger, logger provider, and extension method for easy registration, and update dependencies and service configuration to enable the new logging system.

This logging is not in use currently, but will be in a future PR.

Logging Infrastructure Integration:

  • Added a new CmdPalLogger class implementing ILogger, which delegates logging calls to ManagedCommon.Logger to centralize and standardize log output.
  • Implemented CmdPalLoggerProvider to create and manage CmdPalLogger instances, allowing MEL-based logging throughout the application.
  • Introduced CmdPalLoggingExtensions.AddCmdPalLogging for registering the logger provider via dependency injection, ensuring all MEL logging is routed appropriately.
  • Updated App.xaml.cs to register the new logging system with services.AddCmdPalLogging(), enabling the infrastructure at application startup. [1] [2]

Project and Dependency Updates:

  • Updated the project file Microsoft.CmdPal.Common.csproj to reference the ManagedCommon project and to include a folder for the new logging code. [1] [2]

@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label Apr 3, 2026
@michaeljolley michaeljolley enabled auto-merge (squash) April 3, 2026 23:30
@michaeljolley michaeljolley changed the title Add CmdPalLogger, Provider, and extension method CmdPal: Add CmdPalLogger, Provider, and extension method Apr 3, 2026
@michaeljolley michaeljolley merged commit 1e1bd07 into main Apr 4, 2026
15 checks passed
@michaeljolley michaeljolley deleted the dev/mjolley/logging branch April 4, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants