mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	Add deprecation warning message for injecting ILogger
This commit is contained in:
		
							parent
							
								
									e16c16dd51
								
							
						
					
					
						commit
						710767fbf2
					
				@ -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>();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user