Skip to content

Add structured logging with mcpd-compatible log format#10

Merged
peteski22 merged 1 commit intomainfrom
peteski22/update-logger
Oct 27, 2025
Merged

Add structured logging with mcpd-compatible log format#10
peteski22 merged 1 commit intomainfrom
peteski22/update-logger

Conversation

@peteski22
Copy link
Contributor

Summary

Adds structured logging support to the .NET SDK with automatic log level inference for mcpd's log integration. Implements a custom McpdLogFormatter that outputs logs in [LEVEL] message format, enabling mcpd to properly categorise plugin log messages by severity.

  • Add McpdLogFormatter for compatible log output ([INFO], [WARN], [ERROR])
  • Make Logger non-nullable in BasePlugin with NullLogger default
  • Add optional ILogger parameter to PluginServer.Serve() methods for custom logging
  • Update documentation with logging examples and format specification

@peteski22 peteski22 force-pushed the peteski22/update-logger branch from 1880b23 to 862ac8e Compare October 16, 2025 15:33
@peteski22 peteski22 merged commit affa7fc into main Oct 27, 2025
6 checks passed
@peteski22 peteski22 deleted the peteski22/update-logger branch October 27, 2025 15:52
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.

1 participant