性能分析开关

This commit is contained in:
hudingwen 2021-02-22 09:19:51 +08:00
parent 83481f64f4
commit 2b051dff25
2 changed files with 4 additions and 3 deletions

View File

@ -185,10 +185,11 @@ namespace Blog.Core
app.UseAuthentication();
// 然后是授权中间件
app.UseAuthorization();
//开启性能分析
app.UseMiniProfilerMildd();
// 开启异常中间件,要放到最后
//app.UseExceptionHandlerMidd();
app.UseEndpoints(endpoints =>
{

View File

@ -10,7 +10,7 @@ namespace Blog.Core.Extensions
/// </summary>
public static class MiniProfilerMildd
{
private static readonly ILog log = LogManager.GetLogger(typeof(QuartzJobMildd));
private static readonly ILog log = LogManager.GetLogger(typeof(MiniProfilerMildd));
public static void UseMiniProfilerMildd(this IApplicationBuilder app)
{
if (app == null) throw new ArgumentNullException(nameof(app));