湖南网站推广营销设计,福田手机网站建设,开网站做网站,网络管理系统官网ABP vNext 使用 logdashboard本文示例源码#xff1a;https://github.com/liangshiw/LogDashboard/tree/master/samples/abpvnextABPABP是aspnetcore3.0的开源web应用程序框架#xff0c;非常适合现代web应用程序。有关ABP的更多内容可以查看官方文档Logdashboard可以直接在基… ABP vNext 使用 logdashboard本文示例源码https://github.com/liangshiw/LogDashboard/tree/master/samples/abpvnextABPABP是aspnetcore3.0的开源web应用程序框架非常适合现代web应用程序。有关ABP的更多内容可以查看官方文档Logdashboard可以直接在基于abp应用程序中安装使用关于Logdashboard的更多内容可以查看ASPNETCore开源日志面板 LogDashboard示例本文假设你了解ABP并不对其做详细解释使用 abp cli 创建项目abp new BootStore使用以下代码覆盖Program 中的Serilog配置Log.Logger new LoggerConfiguration()#if DEBUG .MinimumLevel.Debug()#else .MinimumLevel.Information()#endif .MinimumLevel.Override(Microsoft, LogEventLevel.Information) .Enrich.FromLogContext() .WriteTo.Async(c c.File(Logs/logs.log, outputTemplate: {Timestamp:HH:mm} || {Level} || {SourceContext:l} || {Message} || {Exception} ||end {NewLine})) .CreateLogger();安装LogDashboardInstall-Package LogDashboard打开 BootStoreWebModule 类在ConfigureServices 方法末尾添加以下代码context.Services.AddLogDashboard(opt opt.SetRootPath(hostingEnvironment.ContentRootPath));在OnApplicationInitialization 方法末尾添加以下代码app.UseLogDashboard();迁移后运行项目导航到/logdashboardenjoy原文链接https://www.cnblogs.com/LiangSW/p/11933311.html.NET社区新闻深度好文欢迎访问公众号文章汇总 http://www.csharpkit.com