mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-31 21:34:58 +00:00
feat: more debug testing
This commit is contained in:
@@ -24,7 +24,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
/// <param name="context"></param>
|
||||
protected override void HandleGet(HttpCwsContext context)
|
||||
{
|
||||
var appDebug = new AppDebug { Level = Debug.Level };
|
||||
var appDebug = new AppDebug { MinimumLevel = Debug.WebsocketMinimumLogLevel };
|
||||
|
||||
var body = JsonConvert.SerializeObject(appDebug, Formatting.Indented);
|
||||
|
||||
@@ -62,9 +62,9 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
var appDebug = new AppDebug();
|
||||
var requestBody = JsonConvert.DeserializeAnonymousType(data, appDebug);
|
||||
|
||||
Debug.SetDebugLevel(requestBody.Level);
|
||||
Debug.SetWebSocketMinimumDebugLevel(requestBody.MinimumLevel);
|
||||
|
||||
appDebug.Level = Debug.Level;
|
||||
appDebug.MinimumLevel = Debug.WebsocketMinimumLogLevel;
|
||||
var responseBody = JsonConvert.SerializeObject(appDebug, Formatting.Indented);
|
||||
|
||||
context.Response.StatusCode = 200;
|
||||
@@ -76,7 +76,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
|
||||
public class AppDebug
|
||||
{
|
||||
[JsonProperty("level", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public int Level { get; set; }
|
||||
[JsonProperty("minimumLevel", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public Serilog.Events.LogEventLevel MinimumLevel { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user