# Extensions **Repository Path**: EzrealJ/Extensions ## Basic Information - **Project Name**: Extensions - **Description**: .NET 扩展库,只包含扩展 - **Primary Language**: C# - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-13 - **Last Updated**: 2023-04-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 1、Ezreal.Extension.AspNetCoreHttpLogging Import ```C# //in aspnetcore project StartUp.cs public void ConfigureServices(IServiceCollection services) { //...other TODO //Configuration is IConfiguration services.AddEzrealHttpLogging(Configuration.GetSection("ConfigurationSectionName"), option => { option.ModuleName = nameof(AspNetCoreWebApp); option.SegmentedString = new string('-', 48); }); } ``` Use ```C# public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { //...other TODO //Please pay attention to the reasonable arrangement of the pipeline sequence app.UseEzrealHttpLogging(); app.UseRouting(); //...other TODO } ``` Config ```json //for example //in appsettings.json { "Logging": { "LogLevel": { "Ezreal.Extension.AspNetCoreHttpLogging": "Information" } }, "EzrealHttpLogging": { "ReadBody": true, "IgnoreWhenNoError": false, //logging if Ezreal.Extension.AspNetCoreHttpLogging LogLevel Enable this LogLevel "LogLevel": "Information" } } ```