Created
September 9, 2024 07:59
-
-
Save gistlyn/c8441f82377cfed3a35006a51b33020d to your computer and use it in GitHub Desktop.
requestlogs
This file contains 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
using ServiceStack; | |
[assembly: HostingStartup(typeof(MyApp.ConfigureRequestLogs))] | |
namespace MyApp; | |
public class ConfigureRequestLogs : IHostingStartup | |
{ | |
public void Configure(IWebHostBuilder builder) => builder | |
.ConfigureServices((context, services) => { | |
if (context.HostingEnvironment.IsDevelopment()) | |
{ | |
services.AddPlugin(new RequestLogsFeature | |
{ | |
EnableResponseTracking = true, | |
}); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment