Kevin Jump
07/22/2026, 10:36 AMMike Chambers
07/22/2026, 10:49 AMapp.UseSerilogRequestLogging should be the default for reduced log verbosity full stop!
https://github.com/serilog/serilog-aspnetcore#request-logging
https://andrewlock.net/using-serilog-aspnetcore-in-asp-net-core-3-reducing-log-verbosity/
public class SerilogRequestLoggingComposer : IComposer
{
// can move to prePipeline if we want to log static files.
// in 13.1.1 can move to preRouting for just after static files
// postPipeline then although OnExecuting fires, we don't see the logs
public void Compose(IUmbracoBuilder builder)
{
builder.Services.AddControllers(opts => opts.Filters.Add<SerilogLoggingActionFilter>());
builder.Services.Configure<UmbracoPipelineOptions>(options =>
options.AddFilter(
new UmbracoPipelineFilter("SerilogRequestLogging",
preRouting: app => app.UseSerilogRequestLogging(opt =>
{
opt.EnrichDiagnosticContext = LRequestLoggingOptions.EnrichFromRequest;
opt.GetLevel = (httpContext, elapsed, ex) =>
{
// If there's an error, we probably still want to see it
if (ex != null || httpContext.Response.StatusCode >= 400)
return Serilog.Events.LogEventLevel.Error;
// Silence Umbraco backoffice and management API calls
var path = httpContext.Request.Path.Value;
if (path != null && path.StartsWith("/umbraco", StringComparison.OrdinalIgnoreCase))
{
return Serilog.Events.LogEventLevel.Verbose;
}
return Serilog.Events.LogEventLevel.Information;
};
}),
endpoints: null)
)
);
}
}Mike Chambers
07/22/2026, 10:51 AM"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"System": "Warning",
"SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware": "Warning",
"Microsoft.AspNetCore.Identity": "Information",
"OpenIddict.Server.OpenIddictServerDispatcher": "Warning",
"OpenIddict.Core.OpenIddictTokenManager": "Warning",
"OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandler": "Warning",
"Umbraco.Cms.Api.Management": "Warning",
"Umbraco.Cms.Web.BackOffice": "Warning",
"Umbraco.Cms.Web.Common.Controllers": "Warning"
//"Microsoft.AspNetCore.Mvc": "Information"
}
},
and for production... remove the umbraco file logging!
"WriteTo": [
{... central logging}
{
"Name": "UmbracoFile",
"Args": {
"RestrictedToMinimumLevel": "Fatal"
}
}
]Kevin Jump
07/22/2026, 11:02 AMMike Chambers
07/22/2026, 12:03 PMThe authorization request was successfully validated. but no user information to know who. 🙁 (but at least a log for that event)Mike Chambers
07/22/2026, 12:09 PMKevin Jump
07/22/2026, 12:49 PMMike Chambers
07/22/2026, 1:05 PM