-
Notifications
You must be signed in to change notification settings - Fork 333
Cherry pick MCP logging, instructions, and schema fixes to release/2.0 #3512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
084a1ff
Added server description to dab.draft.schema (#3405)
anushakolan 6c45045
Changed default authentication provider to "Unauthenticated" in dab.d…
anushakolan 2ab778e
Added changes to set McpServerOptions.Instructions in HTTPS/SSE mode.…
anushakolan 9985a18
Make CLI Log Labels consistent with ASP.NET Core and use appropriate …
aaronburtle f2514fb
Implemented MCP Set Log Level (#3419)
anushakolan 2550058
Upgrade OpenTelemetry.Exporter.OpenTelemetryProtocol from 1.13.0 to 1…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Cli.Tests; | ||
|
|
||
| /// <summary> | ||
| /// Tests for CustomLoggerProvider and CustomConsoleLogger, verifying | ||
| /// that log level labels use ASP.NET Core abbreviated format. | ||
| /// </summary> | ||
| [TestClass] | ||
| public class CustomLoggerTests | ||
| { | ||
| /// <summary> | ||
| /// Validates that each enabled log level produces the correct abbreviated label | ||
| /// matching ASP.NET Core's default console formatter convention. | ||
| /// Trace and Debug are below the logger's minimum level and produce no output. | ||
| /// </summary> | ||
| [DataTestMethod] | ||
| [DataRow(LogLevel.Information, "info:")] | ||
| [DataRow(LogLevel.Warning, "warn:")] | ||
| [DataRow(LogLevel.Error, "fail:")] | ||
| [DataRow(LogLevel.Critical, "crit:")] | ||
| public void LogOutput_UsesAbbreviatedLogLevelLabels(LogLevel logLevel, string expectedPrefix) | ||
| { | ||
| CustomLoggerProvider provider = new(); | ||
| ILogger logger = provider.CreateLogger("TestCategory"); | ||
|
|
||
| TextWriter originalOut = Console.Out; | ||
| try | ||
| { | ||
| StringWriter writer = new(); | ||
| Console.SetOut(writer); | ||
|
|
||
| logger.Log(logLevel, "test message"); | ||
|
|
||
| string output = writer.ToString(); | ||
| Assert.IsTrue( | ||
| output.StartsWith(expectedPrefix), | ||
| $"Expected output to start with '{expectedPrefix}' but got: '{output}'"); | ||
| Assert.IsTrue( | ||
| output.Contains("test message"), | ||
| $"Expected output to contain 'test message' but got: '{output}'"); | ||
| } | ||
| finally | ||
| { | ||
| Console.SetOut(originalOut); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.