aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-04-04 21:27:48 -0400
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-04-04 21:27:48 -0400
commit710767fbf2c80491448e3c978eec6b2745c9e4db (patch)
treee308ba3872aaa20a64b8234c92689099619915e6 /Emby.Server.Implementations/ApplicationHost.cs
parente16c16dd51c62b1ad004979d729e4ef022359505 (diff)
Add deprecation warning message for injecting ILogger
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 5592d3919..b724dc320 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -570,8 +570,12 @@ namespace Emby.Server.Implementations
serviceCollection.AddSingleton(JsonSerializer);
- // TODO: Support for injecting ILogger should be deprecated in favour of ILogger<T> and this removed
- serviceCollection.AddSingleton<ILogger>(Logger);
+ // TODO: Remove support for injecting ILogger completely
+ serviceCollection.AddSingleton((provider) =>
+ {
+ Logger.LogWarning("Injecting ILogger directly is deprecated and should be replaced with ILogger<T>");
+ return Logger;
+ });
serviceCollection.AddSingleton(FileSystemManager);
serviceCollection.AddSingleton<TvdbClientManager>();