Logging Capability (#53)
* Logging Capability * Readability * Redundant using --------- Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
parent
4d61007c11
commit
10c712a12f
1 changed files with 253 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.Protocol.Types;
|
||||
|
||||
/// <summary>
|
||||
/// Sent from the server as the payload of "notifications/message" notifications whenever a log message is generated.
|
||||
///
|
||||
/// If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.
|
||||
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.json">See the schema for details</see>
|
||||
/// </summary>
|
||||
public class LoggingMessageNotificationParams
|
||||
{
|
||||
/// <summary>
|
||||
/// The severity of this log message.
|
||||
/// </summary>
|
||||
[JsonPropertyName("level")]
|
||||
public LoggingLevel Level { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// An optional name of the logger issuing this message.
|
||||
/// </summary>
|
||||
[JsonPropertyName("logger")]
|
||||
public string? Logger { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public JsonElement? Data { get; init; }
|
||||
}
|
||||
Loading…
Reference in a new issue