Skip to content

Commit 3cd0f2b

Browse files
committed
Integrated logging via Castle.LoggingFacility.MsLogging package.
1 parent 94ec0a4 commit 3cd0f2b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/AbpCompanyName.AbpProjectName.Web/Startup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Abp.Configuration.Startup;
99
using AbpCompanyName.AbpProjectName.EntityFrameworkCore;
1010
using Castle.Facilities.Logging;
11+
using Castle.LoggingFacility.MsLogging;
1112
using Microsoft.AspNetCore.Builder;
1213
using Microsoft.AspNetCore.Hosting;
1314
using Microsoft.AspNetCore.Http;
@@ -85,6 +86,7 @@ public override void Configure(IApplicationBuilder app, IHostingEnvironment env,
8586

8687
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
8788
loggerFactory.AddDebug();
89+
loggerFactory.AddCastleLogger(AbpBootstrapper.IocManager.Resolve<Castle.Core.Logging.ILoggerFactory>());
8890

8991
if (env.IsDevelopment())
9092
{

src/AbpCompanyName.AbpProjectName.Web/project.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"Castle.Windsor-log4net": "3.3.0",
3333
"AbpCompanyName.AbpProjectName.Application": "1.0.0.0-*",
3434
"AbpCompanyName.AbpProjectName.EntityFrameworkCore": "1.0.0.0-*",
35-
"Abp.AspNetCore": "0.9.5"
35+
"Abp.AspNetCore": "0.9.5",
36+
"Castle.LoggingFacility.MsLogging": "0.1.0"
3637
},
3738

3839
"tools": {

0 commit comments

Comments
 (0)