Add logger to API service setup

This commit is contained in:
Ske
2019-07-18 17:26:06 +02:00
parent 961bfe9094
commit 0b4335ccaa
5 changed files with 24 additions and 16 deletions

View File

@@ -32,6 +32,7 @@ namespace PluralKit.API
.AddScoped<TokenAuthService>()
.AddTransient(_ => Configuration.GetSection("PluralKit").Get<CoreConfig>() ?? new CoreConfig())
.AddSingleton(svc => InitUtils.InitLogger(svc.GetRequiredService<CoreConfig>(), "api"))
.AddSingleton(svc => new DbConnectionFactory(svc.GetRequiredService<CoreConfig>().Database));
}