14 implementations of ILoggerFactory
Aspire.Cli.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Dashboard.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Hosting.Testing.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Hosting.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.Playground.Tests (1)
tests\Shared\Logging\TestLoggerFactory.cs (1)
6public class TestLoggerFactory : ILoggerFactory
Aspire.TestUtilities (1)
TestLoggerFactory.cs (1)
10public sealed class TestLoggerFactory : ILoggerFactory
Microsoft.DotNet.HotReload.Watch (1)
UI\IReporter.cs (1)
90internal sealed class LoggerFactory(IReporter reporter, LogLevel level) : ILoggerFactory
Microsoft.Extensions.Logging (2)
LoggerFactory.cs (2)
21public class LoggerFactory : ILoggerFactory 302private sealed class DisposingLoggerFactory : ILoggerFactory
Microsoft.Extensions.Logging.Abstractions (1)
NullLoggerFactory.cs (1)
10public class NullLoggerFactory : ILoggerFactory
Microsoft.Extensions.Telemetry (1)
Logging\ExtendedLoggerFactory.cs (1)
20internal sealed class ExtendedLoggerFactory : ILoggerFactory
Microsoft.Extensions.Telemetry.Tests (1)
Logging\Utils.cs (1)
26internal sealed class DisposingLoggerFactory : ILoggerFactory
Microsoft.Maui (1)
Hosting\MauiAppBuilder.cs (1)
183 private sealed class NullLoggerFactory : ILoggerFactory
936 references to ILoggerFactory
aspire (10)
Commands\AgentMcpCommand.cs (2)
36private readonly ILoggerFactory _loggerFactory; 51ILoggerFactory loggerFactory,
Mcp\StdioMcpTransportFactory.cs (1)
13internal sealed class StdioMcpTransportFactory(ILoggerFactory? loggerFactory) : IMcpTransportFactory
Program.cs (6)
77ILoggerFactory LoggerFactory, 185/// Creates and configures an <see cref="ILoggerFactory"/> for the CLI application. 189/// <returns>A tuple containing the configured <see cref="ILoggerFactory"/> and the <see cref="FileLoggerProvider"/> used for file logging.</returns> 190internal static (ILoggerFactory LoggerFactory, FileLoggerProvider FileLoggerProvider) CreateLoggerFactory(string[] args, CliLoggingOptions loggingOptions, IStartupErrorWriter errorWriter) 202var factory = LoggerFactory.Create(builder => 284builder.Services.AddSingleton<ILoggerFactory>(startupContext.LoggerFactory);
Projects\AppHostServerProject.cs (1)
35ILoggerFactory loggerFactory) : IAppHostServerProjectFactory
Aspire.Azure.AI.Inference (4)
AspireAzureAIInferenceExtensions.cs (4)
277var loggerFactory = services.GetService<ILoggerFactory>(); 530var loggerFactory = services.GetService<ILoggerFactory>();
Aspire.Cli.Tests (13)
Commands\AgentMcpCommandTests.cs (1)
34private ILoggerFactory _loggerFactory = null!;
Mcp\TestMcpServerTransport.cs (3)
20private readonly ILoggerFactory? _loggerFactory; 37public TestMcpServerTransport(ILoggerFactory? loggerFactory = null) 56public Task<McpClient> CreateClientAsync(ILoggerFactory? loggerFactory = null, CancellationToken cancellationToken = default)
Projects\AppHostServerProjectTests.cs (1)
253using var loggerFactory = LoggerFactory.Create(builder =>
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
30public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 36public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 42public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
Utils\CliTestHelper.cs (2)
548var loggerFactory = serviceProvider.GetService<ILoggerFactory>();
Aspire.Components.Common.TestUtilities (3)
ConformanceTests.cs (3)
303builder.Services.AddSingleton<ILoggerFactory, TestLoggerFactory>(); 310builder.Services.AddSingleton<ILoggerFactory, TestLoggerFactory>(); 318TestLoggerFactory loggerFactory = (TestLoggerFactory)host.Services.GetRequiredService<ILoggerFactory>();
Aspire.Confluent.Kafka (2)
AspireKafkaConsumerExtensions.cs (1)
206ILogger logger = serviceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(ConfluentKafkaCommon.LogCategoryName);
AspireKafkaProducerExtensions.cs (1)
206ILogger logger = serviceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(ConfluentKafkaCommon.LogCategoryName);
Aspire.Dashboard (19)
Api\ApiAuthenticationHandler.cs (1)
25ILoggerFactory loggerFactory,
Authentication\Connection\ConnectionTypeAuthenticationHandler.cs (1)
12public ConnectionTypeAuthenticationHandler(IOptionsMonitor<ConnectionTypeAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Authentication\FrontendCompositeAuthenticationHandler.cs (1)
15ILoggerFactory logger,
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (1)
17public OtlpApiKeyAuthenticationHandler(IOptionsMonitor<DashboardOptions> dashboardOptions, IOptionsMonitor<OtlpApiKeyAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Authentication\OtlpCompositeAuthenticationHandler.cs (1)
18ILoggerFactory logger,
Authentication\UnsecuredAuthenticationHandler.cs (1)
14public UnsecuredAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
DashboardWebApplication.cs (1)
540return _app.Services.GetRequiredService<ILoggerFactory>().CreateLogger<DashboardWebApplication>();
Mcp\McpApiKeyAuthenticationHandler.cs (1)
26public McpApiKeyAuthenticationHandler(IOptionsMonitor<DashboardOptions> dashboardOptions, IOptionsMonitor<McpApiKeyAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Mcp\McpCompositeAuthenticationHandler.cs (1)
16ILoggerFactory logger,
Model\Assistant\AssistantChatViewModel.cs (1)
125ILoggerFactory loggerFactory,
Model\Assistant\ChatClientFactory.cs (2)
25private readonly ILoggerFactory _loggerFactory; 37public ChatClientFactory(IConfiguration configuration, ILoggerFactory loggerFactory, IOptionsMonitor<DashboardOptions> dashboardOptions)
Model\BrowserTimeProvider.cs (1)
23public BrowserTimeProvider(ILoggerFactory loggerFactory)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (2)
140var logger = context.RequestServices.GetRequiredService<ILoggerFactory>().CreateLogger("Aspire.Dashboard.Otlp.Http"); 218var logger = httpContext.RequestServices.GetRequiredService<ILoggerFactory>().CreateLogger("Aspire.Dashboard.Otlp.Http");
Otlp\Storage\TelemetryRepository.cs (1)
72public TelemetryRepository(ILoggerFactory loggerFactory, IOptions<DashboardOptions> dashboardOptions, PauseManager pauseManager, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers)
ServiceClient\DashboardClient.cs (2)
56private readonly ILoggerFactory _loggerFactory; 78ILoggerFactory loggerFactory,
ShortcutManager.cs (1)
10public sealed class ShortcutManager(ILoggerFactory loggerFactory) : IDisposable
Aspire.Dashboard.Components.Tests (22)
Controls\ApplicationNameTests.cs (3)
25Services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance); 42Services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance); 64Services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Interactions\InteractionsProviderTests.cs (2)
514var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 517Services.AddSingleton<ILoggerFactory>(loggerFactory);
Pages\ConsoleLogsTests.cs (2)
850var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 852Services.AddSingleton<ILoggerFactory>(loggerFactory);
Pages\LoginTests.cs (2)
54var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 57Services.AddSingleton<ILoggerFactory>(loggerFactory);
Pages\TraceDetailsTests.cs (5)
92var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 160var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 242var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper, testSink: testSink); 624private void SetupTraceDetailsServices(ILoggerFactory? loggerFactory = null) 644Services.AddSingleton<ILoggerFactory>(loggerFactory);
Shared\IntegrationTestHelpers.cs (1)
12public static ILoggerFactory CreateLoggerFactory(ITestOutputHelper testOutputHelper, ITestSink? testSink = null)
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
30public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 36public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 42public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
241ILoggerFactory? loggerFactory = null,
Aspire.Dashboard.Tests (31)
Integration\DashboardClientAuthTests.cs (4)
40var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 56var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper); 67private static async Task<ResourceServiceServer> CreateResourceServiceServerAsync(ILoggerFactory loggerFactory, bool useHttps, Action<TestCalls>? configureCalls = null) 109ILoggerFactory loggerFactory,
Integration\IntegrationTestHelpers.cs (5)
26public static ILoggerFactory CreateLoggerFactory(ITestOutputHelper testOutputHelper, ITestSink? testSink = null) 46var loggerFactory = CreateLoggerFactory(testOutputHelper, testSink); 52ILoggerFactory loggerFactory, 145var loggerFactory = LoggerFactory.Create(builder => 156ILoggerFactory loggerFactory,
Integration\OtlpGrpcServiceTests.cs (1)
159using var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper, testSink: testSink);
Integration\StartupTests.cs (2)
199var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(testOutputHelper); 855var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(testOutputHelper, testSink);
Model\ApplicationsSelectHelpersTests.cs (2)
149var factory = LoggerFactory.Create(b => b.AddProvider(new TestLoggerProvider(testSink))); 182var factory = LoggerFactory.Create(b => b.AddProvider(new TestLoggerProvider(testSink)));
Model\IconResolverTests.cs (1)
51var factory = LoggerFactory.Create(b => b.AddProvider(new TestLoggerProvider(testSink)));
Telemetry\DashboardTelemetryServiceTests.cs (2)
80var loggerFactory = LoggerFactory.Create(b => 161private static async Task<DashboardTelemetryService> CreateTelemetryServiceAsync(IDashboardTelemetrySender? dashboardTelemetrySender = null, ILoggerFactory? loggerFactory = null)
Telemetry\TelemetryLoggerProviderTests.cs (2)
28var loggerProvider = serviceProvider.GetRequiredService<ILoggerFactory>();
TelemetryRepositoryTests\LogTests.cs (1)
706var loggerFactory = IntegrationTestHelpers.CreateLoggerFactory(_testOutputHelper);
TelemetryRepositoryTests\OtlpHelpersTests.cs (2)
428var factory = LoggerFactory.Create(b => 473var factory = LoggerFactory.Create(b =>
TelemetryRepositoryTests\TelemetryRepositoryTests.cs (1)
177var factory = LoggerFactory.Create(b =>
TelemetryRepositoryTests\TraceTests.cs (1)
102var factory = LoggerFactory.Create(b => b.AddProvider(new TestLoggerProvider(testSink)));
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
30public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 36public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 42public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
241ILoggerFactory? loggerFactory = null,
Aspire.Hosting (18)
Ats\AtsTypeMappings.cs (1)
57[assembly: AspireExport(typeof(ILoggerFactory))]
Ats\LoggingExports.cs (3)
21public static ILoggerFactory GetLoggerFactory(this IServiceProvider serviceProvider) 25return serviceProvider.GetRequiredService<ILoggerFactory>(); 80public static ILogger CreateLogger(this ILoggerFactory loggerFactory, string categoryName)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
908serviceProvider.GetRequiredService<ILoggerFactory>(),
BuiltInDistributedApplicationEventSubscriptionHandlers.cs (1)
95var logger = beforeStartEvent.Services.GetRequiredService<ILoggerFactory>().CreateLogger("Aspire.Hosting");
Dashboard\DashboardEventHandlers.cs (4)
39ILoggerFactory loggerFactory, 824ILoggerFactory loggerFactory, 882private static void LogMessage(ILoggerFactory loggerFactory, ConcurrentDictionary<string, ILogger> loggerCache, DashboardLogMessage logMessage) 884var logger = loggerCache.GetOrAdd(logMessage.Category, static (string category, ILoggerFactory loggerFactory) =>
Dashboard\DashboardServiceAuth.cs (1)
29ILoggerFactory logger,
Dashboard\DashboardServiceHost.cs (1)
55ILoggerFactory loggerFactory,
Dcp\DcpHost.cs (2)
28private readonly ILoggerFactory _loggerFactory; 51ILoggerFactory loggerFactory,
Orchestrator\OrchestratorHostService.cs (1)
19ILoggerFactory loggerFactory,
Publishing\ManifestPublishingExtensions.cs (2)
32var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ResourceLoggerForwarderService.cs (1)
19ILoggerFactory loggerFactory)
Aspire.Hosting.Nats (1)
NatsBuilderExtensions.cs (1)
71LoggerFactory = @event.Services.GetRequiredService<ILoggerFactory>(),
Aspire.Hosting.Testing.Tests (7)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
30public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 36public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 42public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
Aspire.Hosting.Tests (46)
Cli\CliOrphanDetectorTests.cs (9)
25var loggerFactory = CreateLoggerFactory(testOutputHelper); 44var loggerFactory = CreateLoggerFactory(testOutputHelper); 71var loggerFactory = CreateLoggerFactory(testOutputHelper); 93var loggerFactory = CreateLoggerFactory(testOutputHelper); 119var loggerFactory = CreateLoggerFactory(testOutputHelper); 163var loggerFactory = CreateLoggerFactory(testOutputHelper); 189var loggerFactory = CreateLoggerFactory(testOutputHelper); 263ILoggerFactory loggerFactory, 273private static ILoggerFactory CreateLoggerFactory(ITestOutputHelper testOutputHelper)
Dashboard\DashboardLifecycleHookTests.cs (3)
34var factory = LoggerFactory.Create(b => 204var loggerFactory = LoggerFactory.Create(b => 567ILoggerFactory? loggerFactory = null,
Dashboard\DashboardServiceTests.cs (7)
139var loggerFactory = LoggerFactory.Create(builder => 221var loggerFactory = LoggerFactory.Create(builder => 291var loggerFactory = LoggerFactory.Create(builder => 338var loggerFactory = LoggerFactory.Create(builder => 397var loggerFactory = LoggerFactory.Create(builder => 434var loggerFactory = LoggerFactory.Create(builder => 583ILoggerFactory? loggerFactory = null,
Dcp\DcpHostNotificationTests.cs (7)
126using var loggerFactory = LoggerFactory.Create(builder => 527using var loggerFactory = LoggerFactory.Create(builder => 579using var loggerFactory = LoggerFactory.Create(builder => 631using var loggerFactory = LoggerFactory.Create(builder => 684using var loggerFactory = LoggerFactory.Create(builder => 747using var loggerFactory = LoggerFactory.Create(builder => 807using var loggerFactory = LoggerFactory.Create(builder =>
FileSystemServiceTests.cs (1)
413var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
Pipelines\DistributedApplicationPipelineTests.cs (12)
1143var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>(); 1177var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>(); 1189var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>(); 1235var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>(); 1284var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>(); 1344var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
30public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 36public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 42public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
Utils\LoggerNotificationExtensions.cs (1)
125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Milvus.Client (1)
AspireMilvusExtensions.cs (1)
104return new MilvusClient(settings.Endpoint, apiKey: settings.Key, database: settings.Database, loggerFactory: serviceProvider.GetRequiredService<ILoggerFactory>());
Aspire.MongoDB.Driver (1)
src\Components\Aspire.MongoDB.Driver\AspireMongoDBDriverExtensions.cs (1)
204clientSettings.LoggingSettings ??= new LoggingSettings(serviceProvider.GetService<ILoggerFactory>());
Aspire.NATS.Net (1)
AspireNatsClientExtensions.cs (1)
139LoggerFactory = provider.GetRequiredService<ILoggerFactory>(),
Aspire.OpenAI (4)
AspireOpenAIClientBuilderChatClientExtensions.cs (2)
75var loggerFactory = services.GetService<ILoggerFactory>();
AspireOpenAIClientBuilderEmbeddingGeneratorExtensions.cs (2)
75var loggerFactory = services.GetService<ILoggerFactory>();
Aspire.OpenAI.Tests (4)
AspireOpenAIClientBuilderChatClientExtensionsTests.cs (2)
237builder.Services.AddSingleton<ILoggerFactory, TestLoggerFactory>(); 252var loggerFactory = (TestLoggerFactory)host.Services.GetRequiredService<ILoggerFactory>();
AspireOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (2)
237builder.Services.AddSingleton<ILoggerFactory, TestLoggerFactory>(); 252var loggerFactory = (TestLoggerFactory)host.Services.GetRequiredService<ILoggerFactory>();
Aspire.Playground.Tests (8)
Infrastructure\DistributedApplicationExtensions.cs (1)
213var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
tests\Shared\Logging\XunitLoggerFactoryExtensions.cs (6)
30public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output) 36public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel) 42public static ILoggerFactory AddXunit(this ILoggerFactory loggerFactory, ITestOutputHelper output, LogLevel minLevel, DateTimeOffset? logStart)
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
AspireEFMySqlExtensions.cs (1)
100if (serviceProvider.GetService<ILoggerFactory>() is { } loggerFactory)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (1)
EnrichMySqlTests.cs (1)
34if (serviceProvider.GetService<ILoggerFactory>() is { } loggerFactory)
Aspire.Qdrant.Client (1)
AspireQdrantExtensions.cs (1)
105return new QdrantClient(settings.Endpoint, apiKey: settings.Key, loggerFactory: serviceProvider.GetRequiredService<ILoggerFactory>());
Aspire.RabbitMQ.Client (2)
src\Components\Aspire.RabbitMQ.Client\RabbitMQEventSourceLogForwarder.cs (2)
18public RabbitMQEventSourceLogForwarder(ILoggerFactory loggerFactory) 24/// Initiates the log forwarding from the RabbitMQ event sources to a provided <see cref="ILoggerFactory"/>, call <see cref="Dispose"/> to stop forwarding.
Aspire.StackExchange.Redis (1)
AspireRedisExtensions.cs (1)
210configurationOptions.LoggerFactory ??= serviceProvider.GetService<ILoggerFactory>();
dotnet-format (3)
Commands\FormatCommandCommon.cs (1)
140var loggerFactory = new LoggerFactory()
Logging\SimpleConsoleLoggerFactoryExtensions.cs (2)
10public static ILoggerFactory AddSimpleConsole(this ILoggerFactory factory, LogLevel minimalLogLevel, LogLevel minimalErrorLevel)
dotnet-watch (2)
Program.cs (2)
17ILoggerFactory loggerFactory, 88internal static Program? TryCreate(CommandLineOptions options, IConsole console, EnvironmentOptions environmentOptions, ILoggerFactory loggerFactory, IProcessOutputReporter processOutputReporter, out int errorCode)
Microsoft.AspNetCore (4)
WebApplication.cs (1)
36Logger = host.Services.GetRequiredService<ILoggerFactory>().CreateLogger(Environment.ApplicationName ?? nameof(WebApplication));
WebHost.cs (3)
129/// configure the <see cref="ILoggerFactory"/> to log to the console and debug output, 149/// configure the <see cref="ILoggerFactory"/> to log to the console and debug output, 301/// configure the <see cref="ILoggerFactory"/> to log to the console and debug output,
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgery.cs (1)
30ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Authentication (20)
AuthenticationHandler.cs (4)
113/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 117protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 129/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 133protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
PolicySchemeHandler.cs (4)
20/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 24public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 31/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 33public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
RemoteAuthenticationHandler.cs (4)
44/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 48protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 55/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 57protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
SignInAuthenticationHandler.cs (4)
21/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 25public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 32/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 34public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
SignOutAuthenticationHandler.cs (4)
20/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 24public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 31/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 33public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Microsoft.AspNetCore.Authentication.BearerToken (1)
BearerTokenHandler.cs (1)
16internal sealed class BearerTokenHandler(IOptionsMonitor<BearerTokenOptions> optionsMonitor, ILoggerFactory loggerFactory, UrlEncoder urlEncoder)
Microsoft.AspNetCore.Authentication.Cookies (4)
CookieAuthenticationHandler.cs (4)
40/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 44public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 52/// <param name="logger">The <see cref="ILoggerFactory"/>.</param> 54public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.OAuth (2)
OAuthHandler.cs (2)
45public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 53public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Components (7)
RenderTree\Renderer.cs (4)
78/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 79public Renderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory) 89/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 91public Renderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, IComponentActivator componentActivator)
Routing\Router.cs (1)
51[Inject] private ILoggerFactory LoggerFactory { get; set; }
Routing\RouteTableFactory.cs (1)
124serviceProvider.GetRequiredService<ILoggerFactory>(),
src\aspnetcore\src\Http\Routing\src\Tree\TreeRouteBuilder.cs (1)
47ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Components.Endpoints (6)
DependencyInjection\DefaultRazorComponentsServiceOptionsConfiguration.cs (1)
16ILoggerFactory loggerFactory,
FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
12internal class ComplexTypeConverterFactory(FormDataMapperOptions options, ILoggerFactory loggerFactory) : IFormDataConverterFactory
FormMapping\FormDataMapperOptions.cs (1)
25public FormDataMapperOptions(ILoggerFactory loggerFactory)
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
14internal partial class FormDataMetadataFactory(List<IFormDataConverterFactory> factories, ILoggerFactory loggerFactory)
Rendering\EndpointHtmlRenderer.cs (1)
57public EndpointHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory)
Rendering\SSRRenderModeBoundary.cs (1)
205.GetRequiredService<ILoggerFactory>()
Microsoft.AspNetCore.Components.Server (4)
Circuits\CircuitFactory.cs (2)
19private readonly ILoggerFactory _loggerFactory; 27ILoggerFactory loggerFactory,
Circuits\RemoteRenderer.cs (1)
43ILoggerFactory loggerFactory,
Circuits\RevalidatingServerAuthenticationStateProvider.cs (1)
24public RevalidatingServerAuthenticationStateProvider(ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Components.Web (6)
HtmlRendering\HtmlRenderer.cs (1)
23public HtmlRenderer(IServiceProvider services, ILoggerFactory loggerFactory)
HtmlRendering\StaticHtmlRenderer.cs (2)
30/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 31public StaticHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory)
Media\MediaComponentBase.cs (1)
70[Inject] internal ILoggerFactory LoggerFactory { get; set; } = default!;
WebRenderer.cs (2)
29/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 34ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
131 [Inject] private ILoggerFactory LoggerFactory { get; set; } = default!;
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
131 [Inject] private ILoggerFactory LoggerFactory { get; set; } = default!;
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
131 [Inject] private ILoggerFactory LoggerFactory { get; set; } = default!;
Microsoft.AspNetCore.CookiePolicy (2)
CookiePolicyMiddleware.cs (2)
34/// <param name="factory">The <see cref="ILoggerFactory"/>.</param> 35public CookiePolicyMiddleware(RequestDelegate next, IOptions<CookiePolicyOptions> options, ILoggerFactory factory)
Microsoft.AspNetCore.Cors (8)
Infrastructure\CorsMiddleware.cs (6)
28/// <param name="loggerFactory">An instance of <see cref="ILoggerFactory"/>.</param> 32ILoggerFactory loggerFactory) 42/// <param name="loggerFactory">An instance of <see cref="ILoggerFactory"/>.</param> 47ILoggerFactory loggerFactory, 66/// <param name="loggerFactory">An instance of <see cref="ILoggerFactory"/>.</param> 71ILoggerFactory loggerFactory)
Infrastructure\CorsService.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 27public CorsService(IOptions<CorsOptions> options, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.DataProtection (60)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (3)
24private readonly ILoggerFactory _loggerFactory; 29/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 30public AuthenticatedEncryptorFactory(ILoggerFactory loggerFactory)
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactory.cs (2)
29/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 30public CngCbcAuthenticatedEncryptorFactory(ILoggerFactory loggerFactory)
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactory.cs (2)
29/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 30public CngGcmAuthenticatedEncryptorFactory(ILoggerFactory loggerFactory)
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactory.cs (2)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public ManagedAuthenticatedEncryptorFactory(ILoggerFactory loggerFactory)
DataProtectionBuilderExtensions.cs (12)
175var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 199var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 222var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 257var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 328var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance; 382var loggerFactory = services.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance;
DataProtectionServiceCollectionExtensions.cs (2)
87var loggerFactory = s.GetService<ILoggerFactory>() ?? NullLoggerFactory.Instance;
EphemeralDataProtectionProvider.cs (4)
41/// <param name="loggerFactory">The <see cref="ILoggerFactory" />.</param> 42public EphemeralDataProtectionProvider(ILoggerFactory loggerFactory) 78public EphemeralKeyRing(ILoggerFactory loggerFactory) 98private static IAuthenticatedEncryptor? GetDefaultEncryptor(ILoggerFactory loggerFactory)
Internal\DataProtectionHostedService.cs (1)
23public DataProtectionHostedService(IKeyRingProvider keyRingProvider, ILoggerFactory loggerFactory)
Internal\KeyManagementOptionsPostSetup.cs (3)
32private readonly ILoggerFactory? _loggerFactory; // Null iff _keyDirectoryPath is null 41public KeyManagementOptionsPostSetup(IConfiguration configuration, ILoggerFactory loggerFactory) 107public ReadOnlyFileSystemXmlRepository(DirectoryInfo directory, ILoggerFactory loggerFactory)
Internal\KeyManagementOptionsSetup.cs (3)
17private readonly ILoggerFactory _loggerFactory; 24public KeyManagementOptionsSetup(ILoggerFactory loggerFactory) 34public KeyManagementOptionsSetup(ILoggerFactory loggerFactory, IRegistryPolicyResolver? registryPolicyResolver)
KeyManagement\DefaultKeyResolver.cs (1)
60public DefaultKeyResolver(IOptions<KeyManagementOptions> keyManagementOptions, ILoggerFactory loggerFactory)
KeyManagement\KeyRingBasedDataProtectionProvider.cs (1)
17public KeyRingBasedDataProtectionProvider(IKeyRingProvider keyRingProvider, ILoggerFactory loggerFactory)
KeyManagement\KeyRingProvider.cs (1)
48ILoggerFactory loggerFactory)
KeyManagement\XmlKeyManager.cs (5)
57private readonly ILoggerFactory _loggerFactory; 81/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 83public XmlKeyManager(IOptions<KeyManagementOptions> keyManagementOptions, IActivator activator, ILoggerFactory loggerFactory) 91ILoggerFactory loggerFactory, 129ILoggerFactory loggerFactory,
LoggingServiceProviderExtensions.cs (5)
17/// This is equivalent to <see cref="LoggerFactoryExtensions.CreateLogger{T}(ILoggerFactory)"/>. 21/// <see cref="IServiceProvider"/> cannot produce an <see cref="ILoggerFactory"/>. 30/// This is equivalent to <see cref="LoggerFactoryExtensions.CreateLogger{T}(ILoggerFactory)"/>. 34/// <see cref="IServiceProvider"/> cannot produce an <see cref="ILoggerFactory"/>. 40return services?.GetService<ILoggerFactory>()?.CreateLogger(type.FullName!) ?? NullLogger.Instance;
Repositories\EphemeralXmlRepository.cs (1)
21public EphemeralXmlRepository(ILoggerFactory loggerFactory)
Repositories\FileSystemXmlRepository.cs (2)
28/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 29public FileSystemXmlRepository(DirectoryInfo directory, ILoggerFactory loggerFactory)
Repositories\RegistryXmlRepository.cs (2)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 32public RegistryXmlRepository(RegistryKey registryKey, ILoggerFactory loggerFactory)
TypeForwardingActivator.cs (1)
24public TypeForwardingActivator(IServiceProvider services, ILoggerFactory loggerFactory)
XmlEncryption\CertificateXmlEncryptor.cs (3)
30public CertificateXmlEncryptor(string thumbprint, ICertificateResolver certificateResolver, ILoggerFactory loggerFactory) 43public CertificateXmlEncryptor(X509Certificate2 certificate, ILoggerFactory loggerFactory) 51internal CertificateXmlEncryptor(ILoggerFactory loggerFactory, IInternalCertificateXmlEncryptor? encryptor)
XmlEncryption\DpapiNGXmlEncryptor.cs (2)
34/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 35public DpapiNGXmlEncryptor(string protectionDescriptorRule, DpapiNGProtectionDescriptorFlags flags, ILoggerFactory loggerFactory)
XmlEncryption\DpapiXmlEncryptor.cs (2)
32/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 33public DpapiXmlEncryptor(bool protectToLocalMachine, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Diagnostics (8)
DeveloperExceptionPage\DeveloperExceptionPageMiddleware.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 32ILoggerFactory loggerFactory,
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
48ILoggerFactory loggerFactory,
ExceptionHandler\ExceptionHandlerExtensions.cs (2)
118var loggerFactory = app.ApplicationServices.GetRequiredService<ILoggerFactory>();
ExceptionHandler\ExceptionHandlerMiddleware.cs (2)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 29ILoggerFactory loggerFactory,
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
35ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (8)
Logging\AcceptanceTests.cs (8)
70ILoggerFactory loggerFactory = context.RequestServices.GetRequiredService<ILoggerFactory>(); 833using var loggerFactory = sp.GetRequiredService<ILoggerFactory>(); 877using var loggerFactory = sp.GetRequiredService<ILoggerFactory>(); 924using var loggerFactory = sp.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.Hosting (4)
GenericHost\GenericWebHostService.cs (1)
21ILoggerFactory loggerFactory,
Internal\WebHost.cs (1)
130_logger = _applicationServices.GetRequiredService<ILoggerFactory>().CreateLogger("Microsoft.AspNetCore.Hosting.Diagnostics");
WebHostBuilder.cs (1)
119/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
WebHostBuilderExtensions.cs (1)
216/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
Microsoft.AspNetCore.Hosting.Abstractions (1)
IWebHostBuilder.cs (1)
28/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
Microsoft.AspNetCore.Http.Connections (9)
Internal\HttpConnectionContext.cs (1)
444ILoggerFactory loggerFactory,
Internal\HttpConnectionDispatcher.cs (2)
44private readonly ILoggerFactory _loggerFactory; 54public HttpConnectionDispatcher(HttpConnectionManager manager, ILoggerFactory loggerFactory, HttpConnectionsMetrics metrics)
Internal\HttpConnectionManager.cs (1)
30public HttpConnectionManager(ILoggerFactory loggerFactory, IHostApplicationLifetime appLifetime, IOptions<ConnectionOptions> connectionOptions, HttpConnectionsMetrics metrics)
Internal\Transports\LongPollingServerTransport.cs (2)
17public LongPollingServerTransport(CancellationToken timeoutToken, PipeReader application, ILoggerFactory loggerFactory) 21public LongPollingServerTransport(CancellationToken timeoutToken, PipeReader application, ILoggerFactory loggerFactory, HttpConnectionContext? connection)
Internal\Transports\ServerSentEventsServerTransport.cs (2)
17public ServerSentEventsServerTransport(PipeReader application, string connectionId, ILoggerFactory loggerFactory) 21public ServerSentEventsServerTransport(PipeReader application, string connectionId, HttpConnectionContext? connection, ILoggerFactory loggerFactory)
Internal\Transports\WebSocketsServerTransport.cs (1)
23public WebSocketsServerTransport(WebSocketOptions options, IDuplexPipe application, HttpConnectionContext connection, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Http.Extensions (5)
RequestDelegateFactory.cs (2)
2875var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
12internal class ComplexTypeConverterFactory(FormDataMapperOptions options, ILoggerFactory loggerFactory) : IFormDataConverterFactory
src\aspnetcore\src\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (1)
25public FormDataMapperOptions(ILoggerFactory loggerFactory)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
14internal partial class FormDataMetadataFactory(List<IFormDataConverterFactory> factories, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Http.Results (78)
Accepted.cs (2)
64var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
AcceptedAtRoute.cs (2)
94var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
AcceptedAtRouteOfT.cs (2)
108var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
AcceptedOfT.cs (2)
85var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
BadRequest.cs (2)
39var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
BadRequestOfT.cs (2)
50var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ChallengeHttpResult.cs (2)
75var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Conflict.cs (2)
39var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ConflictOfT.cs (2)
50var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ContentHttpResult.cs (2)
63var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Created.cs (2)
64var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
CreatedAtRoute.cs (2)
94var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
CreatedAtRouteOfT.cs (2)
108var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
CreatedOfT.cs (2)
84var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
FileContentHttpResult.cs (2)
112var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
FileStreamHttpResult.cs (2)
118var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ForbidHttpResult.cs (2)
86var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
InternalServerError.cs (2)
39var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
InternalServerErrorOfT.cs (2)
50var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
JsonHttpResultOfT.cs (2)
97var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
NoContent.cs (2)
38var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
NotFound.cs (2)
38var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
NotFoundOfT.cs (2)
49var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Ok.cs (2)
38var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
OkOfT.cs (2)
49var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
PhysicalFileHttpResult.cs (2)
122var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ProblemHttpResult.cs (2)
56var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
PushStreamHttpResult.cs (2)
106var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
RedirectHttpResult.cs (2)
94var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
RedirectToRouteHttpResult.cs (2)
175var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
SignInHttpResult.cs (2)
61var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
SignOutHttpResult.cs (2)
75var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
StatusCodeHttpResult.cs (2)
42var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
UnauthorizedHttpResult.cs (2)
35var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
UnprocessableEntity.cs (2)
39var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
UnprocessableEntityOfT.cs (2)
50var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Utf8ContentHttpResult.cs (2)
58var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
ValidationProblem.cs (2)
56var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
VirtualFileHttpResult.cs (2)
117var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.HttpLogging (2)
FileLoggerProcessor.cs (1)
40public FileLoggerProcessor(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory)
W3CLoggerProcessor.cs (1)
19public W3CLoggerProcessor(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory) : base(options, environment, factory)
Microsoft.AspNetCore.HttpOverrides (3)
CertificateForwardingMiddleware.cs (1)
29ILoggerFactory loggerFactory,
ForwardedHeadersMiddleware.cs (2)
44/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 46public ForwardedHeadersMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IOptions<ForwardedHeadersOptions> options)
Microsoft.AspNetCore.HttpsPolicy (3)
HstsMiddleware.cs (1)
33public HstsMiddleware(RequestDelegate next, IOptions<HstsOptions> options, ILoggerFactory loggerFactory)
HttpsRedirectionMiddleware.cs (2)
36public HttpsRedirectionMiddleware(RequestDelegate next, IOptions<HttpsRedirectionOptions> options, IConfiguration config, ILoggerFactory loggerFactory) 66public HttpsRedirectionMiddleware(RequestDelegate next, IOptions<HttpsRedirectionOptions> options, IConfiguration config, ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Identity (7)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (2)
1546var loggerFactory = serviceProvider?.GetRequiredService<ILoggerFactory>();
IdentityServiceCollectionExtensions.cs (1)
191private sealed class CompositeIdentityHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder)
SecurityStampValidator.cs (2)
27public SecurityStampValidator(IOptions<SecurityStampValidatorOptions> options, SignInManager<TUser> signInManager, ISystemClock clock, ILoggerFactory logger) 44public SecurityStampValidator(IOptions<SecurityStampValidatorOptions> options, SignInManager<TUser> signInManager, ILoggerFactory logger)
TwoFactorSecurityStampValidator.cs (2)
26public TwoFactorSecurityStampValidator(IOptions<SecurityStampValidatorOptions> options, SignInManager<TUser> signInManager, ISystemClock clock, ILoggerFactory logger) : base(options, signInManager, clock, logger) 35public TwoFactorSecurityStampValidator(IOptions<SecurityStampValidatorOptions> options, SignInManager<TUser> signInManager, ILoggerFactory logger) : base(options, signInManager, logger)
Microsoft.AspNetCore.Localization (2)
RequestLocalizationMiddleware.cs (2)
32/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 33public RequestLocalizationMiddleware(RequestDelegate next, IOptions<RequestLocalizationOptions> options, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
ApiDescriptionGroupCollectionProvider.cs (1)
39ILoggerFactory loggerFactory) : this(actionDescriptorCollectionProvider, apiDescriptionProviders)
DependencyInjection\EndpointMethodInfoApiExplorerServiceCollectionExtensions.cs (1)
28sp.GetRequiredService<ILoggerFactory>()));
DependencyInjection\MvcApiExplorerMvcCoreBuilderExtensions.cs (1)
38sp.GetRequiredService<ILoggerFactory>()));
Microsoft.AspNetCore.Mvc.Core (140)
ChallengeResult.cs (2)
96var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Filters\DisableRequestSizeLimitFilter.cs (1)
20public DisableRequestSizeLimitFilter(ILoggerFactory loggerFactory)
Filters\OutputCacheFilter.cs (2)
20/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 21public OutputCacheFilter(ILoggerFactory loggerFactory)
Filters\RequestFormLimitsFilter.cs (1)
16public RequestFormLimitsFilter(ILoggerFactory loggerFactory)
Filters\RequestSizeLimitFilter.cs (1)
21public RequestSizeLimitFilter(ILoggerFactory loggerFactory)
Filters\ResponseCacheFilter.cs (2)
21/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 22public ResponseCacheFilter(CacheProfile cacheProfile, ILoggerFactory loggerFactory)
ForbidResult.cs (2)
97var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Formatters\FormatFilter.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 27public FormatFilter(IOptions<MvcOptions> options, ILoggerFactory loggerFactory)
Infrastructure\ActionSelector.cs (2)
34/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 38ILoggerFactory loggerFactory)
Infrastructure\ConfigureCompatibilityOptions.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 29ILoggerFactory loggerFactory,
Infrastructure\ControllerActionInvokerProvider.cs (2)
33ILoggerFactory loggerFactory, 43ILoggerFactory loggerFactory,
Infrastructure\DefaultOutputFormatterSelector.cs (1)
37public DefaultOutputFormatterSelector(IOptions<MvcOptions> options, ILoggerFactory loggerFactory)
Infrastructure\FileContentResultExecutor.cs (1)
20public FileContentResultExecutor(ILoggerFactory loggerFactory)
Infrastructure\FileResultExecutorBase.cs (2)
77/// <param name="factory">The <see cref="ILoggerFactory"/>.</param> 79protected static ILogger CreateLogger<T>(ILoggerFactory factory)
Infrastructure\FileStreamResultExecutor.cs (1)
20public FileStreamResultExecutor(ILoggerFactory loggerFactory)
Infrastructure\LocalRedirectResultExecutor.cs (1)
26public LocalRedirectResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\ModelStateInvalidFilterFactory.cs (2)
22var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
Infrastructure\MvcCoreMvcOptionsSetup.cs (2)
26private readonly ILoggerFactory _loggerFactory; 34public MvcCoreMvcOptionsSetup(IHttpRequestStreamReaderFactory readerFactory, ILoggerFactory loggerFactory, IOptions<JsonOptions> jsonOptions)
Infrastructure\ObjectResultExecutor.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 31ILoggerFactory loggerFactory,
Infrastructure\PhysicalFileResultExecutor.cs (1)
20public PhysicalFileResultExecutor(ILoggerFactory loggerFactory)
Infrastructure\RedirectResultExecutor.cs (1)
23public RedirectResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToActionResultExecutor.cs (1)
24public RedirectToActionResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToPageResultExecutor.cs (1)
24public RedirectToPageResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\RedirectToRouteResultExecutor.cs (1)
24public RedirectToRouteResultExecutor(ILoggerFactory loggerFactory, IUrlHelperFactory urlHelperFactory)
Infrastructure\VirtualFileResultExecutor.cs (1)
25public VirtualFileResultExecutor(ILoggerFactory loggerFactory, IWebHostEnvironment hostingEnvironment)
ModelBinding\Binders\ArrayModelBinder.cs (6)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public ArrayModelBinder(IModelBinder elementBinder, ILoggerFactory loggerFactory) 36/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 49ILoggerFactory loggerFactory, 61/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 78ILoggerFactory loggerFactory,
ModelBinding\Binders\ArrayModelBinderProvider.cs (2)
28var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\BodyModelBinder.cs (4)
48/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 52ILoggerFactory? loggerFactory) 65/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 70ILoggerFactory? loggerFactory,
ModelBinding\Binders\BodyModelBinderProvider.cs (5)
21private readonly ILoggerFactory _loggerFactory; 39/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 40public BodyModelBinderProvider(IList<IInputFormatter> formatters, IHttpRequestStreamReaderFactory readerFactory, ILoggerFactory loggerFactory) 50/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 55ILoggerFactory loggerFactory,
ModelBinding\Binders\ByteArrayModelBinder.cs (2)
20/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 21public ByteArrayModelBinder(ILoggerFactory loggerFactory)
ModelBinding\Binders\ByteArrayModelBinderProvider.cs (2)
23var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\CollectionModelBinder.cs (6)
34/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 35public CollectionModelBinder(IModelBinder elementBinder, ILoggerFactory loggerFactory) 46/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 54ILoggerFactory loggerFactory, 71/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 81ILoggerFactory loggerFactory,
ModelBinding\Binders\CollectionModelBinderProvider.cs (2)
60var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (2)
24var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\ComplexTypeModelBinder.cs (4)
44/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 47ILoggerFactory loggerFactory) 58/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 67ILoggerFactory loggerFactory,
ModelBinding\Binders\ComplexTypeModelBinderProvider.cs (2)
31var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\DateTimeModelBinder.cs (2)
23/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 24public DateTimeModelBinder(DateTimeStyles supportedStyles, ILoggerFactory loggerFactory)
ModelBinding\Binders\DateTimeModelBinderProvider.cs (2)
27var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\DecimalModelBinder.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public DecimalModelBinder(NumberStyles supportedStyles, ILoggerFactory loggerFactory)
ModelBinding\Binders\DictionaryModelBinder.cs (6)
27/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 28public DictionaryModelBinder(IModelBinder keyBinder, IModelBinder valueBinder, ILoggerFactory loggerFactory) 41/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 57ILoggerFactory loggerFactory, 75/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 95ILoggerFactory loggerFactory,
ModelBinding\Binders\DictionaryModelBinderProvider.cs (2)
35var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\DoubleModelBinder.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public DoubleModelBinder(NumberStyles supportedStyles, ILoggerFactory loggerFactory)
ModelBinding\Binders\EnumTypeModelBinder.cs (2)
23/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>,</param> 30ILoggerFactory loggerFactory)
ModelBinding\Binders\EnumTypeModelBinderProvider.cs (2)
32var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\FloatingPointTypeModelBinderProvider.cs (2)
28var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\FloatModelBinder.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public FloatModelBinder(NumberStyles supportedStyles, ILoggerFactory loggerFactory)
ModelBinding\Binders\FormCollectionModelBinder.cs (2)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public FormCollectionModelBinder(ILoggerFactory loggerFactory)
ModelBinding\Binders\FormCollectionModelBinderProvider.cs (2)
36var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\FormFileModelBinder.cs (2)
25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public FormFileModelBinder(ILoggerFactory loggerFactory)
ModelBinding\Binders\FormFileModelBinderProvider.cs (2)
29var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\HeaderModelBinder.cs (4)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public HeaderModelBinder(ILoggerFactory loggerFactory) 33/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 36public HeaderModelBinder(ILoggerFactory loggerFactory, IModelBinder innerModelBinder)
ModelBinding\Binders\HeaderModelBinderProvider.cs (2)
29var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\KeyValuePairModelBinder.cs (2)
26/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 27public KeyValuePairModelBinder(IModelBinder keyBinder, IModelBinder valueBinder, ILoggerFactory loggerFactory)
ModelBinding\Binders\KeyValuePairModelBinderProvider.cs (2)
34var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\SimpleTypeModelBinder.cs (2)
24/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 25public SimpleTypeModelBinder(Type type, ILoggerFactory loggerFactory)
ModelBinding\Binders\SimpleTypeModelBinderProvider.cs (2)
23var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\Binders\TryParseModelBinder.cs (2)
32/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 33public TryParseModelBinder(Type modelType, ILoggerFactory loggerFactory)
ModelBinding\Binders\TryParseModelBinderProvider.cs (2)
21var loggerFactory = context.Services.GetRequiredService<ILoggerFactory>();
ModelBinding\ModelBinderFactory.cs (2)
45var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
ModelBinding\ParameterBinder.cs (2)
28/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 35ILoggerFactory loggerFactory)
ResponseCacheAttribute.cs (2)
122var loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>();
Routing\ControllerRequestDelegateFactory.cs (2)
35ILoggerFactory loggerFactory, 45ILoggerFactory loggerFactory,
Routing\MvcAttributeRouteHandler.cs (1)
24ILoggerFactory loggerFactory)
Routing\MvcRouteHandler.cs (1)
23ILoggerFactory loggerFactory)
SignInResult.cs (2)
83var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
SignOutResult.cs (2)
113var loggerFactory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
StatusCodeResult.cs (2)
39var factory = httpContext.RequestServices.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.Mvc.Cors (2)
CorsAuthorizationFilter.cs (2)
37/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 41ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.Formatters.Xml (14)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (3)
20private readonly ILoggerFactory _loggerFactory; 25/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 26public XmlDataContractSerializerMvcOptionsSetup(ILoggerFactory loggerFactory)
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (3)
18private readonly ILoggerFactory _loggerFactory; 23/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 24public XmlSerializerMvcOptionsSetup(ILoggerFactory loggerFactory)
XmlDataContractSerializerOutputFormatter.cs (4)
44/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 45public XmlDataContractSerializerOutputFormatter(ILoggerFactory loggerFactory) 63/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 64public XmlDataContractSerializerOutputFormatter(XmlWriterSettings writerSettings, ILoggerFactory loggerFactory)
XmlSerializerOutputFormatter.cs (4)
43/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 44public XmlSerializerOutputFormatter(ILoggerFactory loggerFactory) 62/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 63public XmlSerializerOutputFormatter(XmlWriterSettings writerSettings, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.Razor (8)
Compilation\DefaultViewCompilerProvider.cs (1)
16ILoggerFactory loggerFactory)
RazorViewEngine.cs (1)
54ILoggerFactory loggerFactory,
TagHelpers\BodyTagHelper.cs (2)
22/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 23public BodyTagHelper(ITagHelperComponentManager manager, ILoggerFactory loggerFactory)
TagHelpers\HeadTagHelper.cs (2)
22/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 23public HeadTagHelper(ITagHelperComponentManager manager, ILoggerFactory loggerFactory)
TagHelpers\TagHelperComponentTagHelper.cs (2)
28/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 34ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.RazorPages (7)
ApplicationModels\ResponseCacheFilterApplicationModelProvider.cs (2)
14private readonly ILoggerFactory _loggerFactory; 16public ResponseCacheFilterApplicationModelProvider(IOptions<MvcOptions> mvcOptionsAccessor, ILoggerFactory loggerFactory)
Filters\PageResponseCacheFilter.cs (2)
22/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 23public PageResponseCacheFilter(CacheProfile cacheProfile, ILoggerFactory loggerFactory)
Infrastructure\PageActionInvokerProvider.cs (1)
41ILoggerFactory loggerFactory,
Infrastructure\PageRequestDelegateFactory.cs (2)
42ILoggerFactory loggerFactory, 56ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Cache\DistributedCacheTagHelperService.cs (2)
45/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 50ILoggerFactory loggerFactory)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
CookieTempDataProvider.cs (2)
35/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 40ILoggerFactory loggerFactory,
Filters\AutoValidateAntiforgeryTokenAuthorizationFilter.cs (1)
13public AutoValidateAntiforgeryTokenAuthorizationFilter(IAntiforgery antiforgery, ILoggerFactory loggerFactory)
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
15public ValidateAntiforgeryTokenAuthorizationFilter(IAntiforgery antiforgery, ILoggerFactory loggerFactory)
PartialViewResultExecutor.cs (2)
33/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 41ILoggerFactory loggerFactory,
ViewComponentResultExecutor.cs (2)
39/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 46ILoggerFactory loggerFactory,
ViewComponents\DefaultViewComponentInvokerFactory.cs (1)
20ILoggerFactory loggerFactory)
ViewResultExecutor.cs (2)
33/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 41ILoggerFactory loggerFactory,
Microsoft.AspNetCore.OutputCaching (3)
OutputCacheMiddleware.cs (3)
36/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 43ILoggerFactory loggerFactory, 61ILoggerFactory loggerFactory,
Microsoft.AspNetCore.ResponseCaching (3)
ResponseCachingMiddleware.cs (3)
37/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used for logging.</param> 42ILoggerFactory loggerFactory, 60ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Rewrite (3)
RewriteBuilderExtensions.cs (2)
58var loggerFactory = app.ApplicationServices.GetRequiredService<ILoggerFactory>();
RewriteMiddleware.cs (1)
35ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Routing (10)
DependencyInjection\RoutingServiceCollectionExtensions.cs (2)
61var loggerFactory = s.GetRequiredService<ILoggerFactory>();
Matching\DfaMatcherBuilder.cs (2)
20private readonly ILoggerFactory _loggerFactory; 37ILoggerFactory loggerFactory,
RouteBase.cs (2)
318var factory = context.RequestServices.GetRequiredService<ILoggerFactory>();
RouterMiddleware.cs (2)
23/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 27ILoggerFactory loggerFactory,
Tree\TreeRouteBuilder.cs (2)
42/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 47ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Server.IISIntegration (4)
IISMiddleware.cs (4)
42/// <param name="loggerFactory">The <see cref="ILoggerFactory" />.</param> 49ILoggerFactory loggerFactory, 62/// <param name="loggerFactory">The <see cref="ILoggerFactory" />.</param> 69ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Server.Kestrel.Core (13)
Internal\Infrastructure\KestrelTrace.cs (1)
16public KestrelTrace(ILoggerFactory loggerFactory)
Internal\KestrelServerImpl.cs (2)
41ILoggerFactory loggerFactory, 77private static ServiceContext CreateServiceContext(IOptions<KestrelServerOptions> options, ILoggerFactory loggerFactory, DiagnosticSource? diagnosticSource, KestrelMetrics metrics,
KestrelServer.cs (2)
30/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 31public KestrelServer(IOptions<KestrelServerOptions> options, IConnectionListenerFactory transportFactory, ILoggerFactory loggerFactory)
ListenOptionsHttpsExtensions.cs (4)
198var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>(); 261var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>();
Middleware\HttpsConnectionMiddleware.cs (2)
62public HttpsConnectionMiddleware(ConnectionDelegate next, HttpsConnectionAdapterOptions options, HttpProtocols httpProtocols, ILoggerFactory loggerFactory, KestrelMetrics metrics) 131ILoggerFactory loggerFactory,
Middleware\ListenOptionsConnectionLoggingExtensions.cs (2)
36var loggerFactory = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<ILoggerFactory>();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
QuicTransportFactory.cs (1)
21public QuicTransportFactory(ILoggerFactory loggerFactory, IOptions<QuicTransportOptions> options)
Microsoft.AspNetCore.Session (7)
DistributedSession.cs (2)
55/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 63ILoggerFactory loggerFactory,
DistributedSessionStore.cs (3)
16private readonly ILoggerFactory _loggerFactory; 22/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 23public DistributedSessionStore(IDistributedCache cache, ILoggerFactory loggerFactory)
SessionMiddleware.cs (2)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> representing the factory that used to create logger instances.</param> 37ILoggerFactory loggerFactory,
Microsoft.AspNetCore.SignalR.Core (3)
HubConnectionContext.cs (1)
70public HubConnectionContext(ConnectionContext connectionContext, HubConnectionContextOptions contextOptions, ILoggerFactory loggerFactory)
HubConnectionHandler.cs (2)
23private readonly ILoggerFactory _loggerFactory; 53ILoggerFactory loggerFactory,
Microsoft.AspNetCore.StaticFiles (2)
StaticFileMiddleware.cs (2)
31/// <param name="loggerFactory">An <see cref="ILoggerFactory"/> instance used to create loggers.</param> 32public StaticFileMiddleware(RequestDelegate next, IWebHostEnvironment hostingEnv, IOptions<StaticFileOptions> options, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.WebSockets (2)
WebSocketMiddleware.cs (2)
34/// <param name="loggerFactory">An <see cref="ILoggerFactory"/> instance used to create loggers.</param> 35public WebSocketMiddleware(RequestDelegate next, IOptions<WebSocketOptions> options, ILoggerFactory loggerFactory)
Microsoft.CodeAnalysis.Workspaces.MSBuild (5)
MSBuild\BuildHostProcessManager.cs (3)
28private readonly ILoggerFactory? _loggerFactory; 44ILoggerFactory? loggerFactory = null) 437public BuildHostProcess(Process process, ILoggerFactory? loggerFactory)
MSBuild\MSBuildProjectLoader.cs (2)
29private readonly Microsoft.Extensions.Logging.ILoggerFactory _loggerFactory; 73internal Microsoft.Extensions.Logging.ILoggerFactory LoggerFactory
Microsoft.DotNet.HotReload.Watch (6)
Context\DotNetWatchContext.cs (1)
19public required ILoggerFactory LoggerFactory { get; init; }
Process\ProjectLauncher.cs (1)
23public ILoggerFactory LoggerFactory
src\sdk\src\Dotnet.Watch\HotReloadClient\Logging\LoggingUtilities.cs (1)
12public static ILogger CreateLogger(this ILoggerFactory factory, string componentName, string displayName)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\AbstractBrowserRefreshServer.cs (1)
25internal abstract class AbstractBrowserRefreshServer(string middlewareAssemblyPath, ILogger logger, ILoggerFactory loggerFactory) : IDisposable
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\BrowserConnection.cs (1)
30public BrowserConnection(WebSocket clientSocket, string? sharedSecret, ILoggerFactory loggerFactory)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\BrowserRefreshServer.cs (1)
26ILoggerFactory loggerFactory,
Microsoft.Extensions.AI (29)
ChatCompletion\FunctionInvokingChatClient.cs (2)
86/// <param name="loggerFactory">An <see cref="ILoggerFactory"/> to use for logging information about function invocation.</param> 88public FunctionInvokingChatClient(IChatClient innerClient, ILoggerFactory? loggerFactory = null, IServiceProvider? functionInvocationServices = null)
ChatCompletion\FunctionInvokingChatClientBuilderExtensions.cs (3)
21/// <param name="loggerFactory">An optional <see cref="ILoggerFactory"/> to use to create a logger for logging function invocations.</param> 27ILoggerFactory? loggerFactory = null, 34loggerFactory ??= services.GetService<ILoggerFactory>();
ChatCompletion\LoggingChatClientBuilderExtensions.cs (3)
18/// An optional <see cref="ILoggerFactory"/> used to create a logger with which logging should be performed. 34ILoggerFactory? loggerFactory = null, 41loggerFactory ??= services.GetRequiredService<ILoggerFactory>();
ChatCompletion\OpenTelemetryChatClientBuilderExtensions.cs (3)
22/// <param name="loggerFactory">An optional <see cref="ILoggerFactory"/> to use to create a logger for logging events.</param> 28ILoggerFactory? loggerFactory = null, 33loggerFactory ??= services.GetService<ILoggerFactory>();
ChatCompletion\OpenTelemetryImageGeneratorBuilderExtensions.cs (3)
25/// <param name="loggerFactory">An optional <see cref="ILoggerFactory"/> to use to create a logger for logging events.</param> 31ILoggerFactory? loggerFactory = null, 36loggerFactory ??= services.GetService<ILoggerFactory>();
Embeddings\LoggingEmbeddingGeneratorBuilderExtensions.cs (3)
20/// An optional <see cref="ILoggerFactory"/> used to create a logger with which logging should be performed. 36ILoggerFactory? loggerFactory = null, 44loggerFactory ??= services.GetRequiredService<ILoggerFactory>();
Embeddings\OpenTelemetryEmbeddingGeneratorBuilderExtensions.cs (3)
24/// <param name="loggerFactory">An optional <see cref="ILoggerFactory"/> to use to create a logger for logging events.</param> 30ILoggerFactory? loggerFactory = null, 36loggerFactory ??= services.GetService<ILoggerFactory>();
Image\LoggingImageGeneratorBuilderExtensions.cs (3)
21/// An optional <see cref="ILoggerFactory"/> used to create a logger with which logging should be performed. 37ILoggerFactory? loggerFactory = null, 44loggerFactory ??= services.GetRequiredService<ILoggerFactory>();
SpeechToText\LoggingSpeechToTextClientBuilderExtensions.cs (3)
21/// An optional <see cref="ILoggerFactory"/> used to create a logger with which logging should be performed. 36ILoggerFactory? loggerFactory = null, 43loggerFactory ??= services.GetRequiredService<ILoggerFactory>();
SpeechToText\OpenTelemetrySpeechToTextClientBuilderExtensions.cs (3)
25/// <param name="loggerFactory">An optional <see cref="ILoggerFactory"/> to use to create a logger for logging events.</param> 31ILoggerFactory? loggerFactory = null, 36loggerFactory ??= services.GetService<ILoggerFactory>();
Microsoft.Extensions.AI.Evaluation.Console (1)
Program.cs (1)
35using ILoggerFactory factory =
Microsoft.Extensions.AI.Integration.Tests (4)
ChatClientIntegrationTests.cs (4)
845using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(LogLevel.Trace)); 864using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(LogLevel.Trace)); 886using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(LogLevel.Trace)); 912using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(LogLevel.Trace));
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAISpeechToTextClientTests.cs (1)
50using var factory = LoggerFactory.Create(b => b.AddFakeLogging());
Microsoft.Extensions.AI.Tests (15)
ChatCompletion\FunctionInvokingChatClientTests.cs (7)
1054b.Use((c, services) => new FunctionInvokingChatClient(c, services.GetRequiredService<ILoggerFactory>())); 3253b.Use((c, services) => new FunctionInvokingChatClient(c, services.GetRequiredService<ILoggerFactory>())); 3285b.Use((c, services) => new FunctionInvokingChatClient(c, services.GetRequiredService<ILoggerFactory>())); 3318b.Use((c, services) => new FunctionInvokingChatClient(c, services.GetRequiredService<ILoggerFactory>())); 3356b.Use((c, services) => new FunctionInvokingChatClient(c, services.GetRequiredService<ILoggerFactory>())); 3368using var loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(LogLevel.Debug)); 3405using var loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(LogLevel.Debug));
ChatCompletion\LoggingChatClientTests.cs (2)
32using var factory = LoggerFactory.Create(b => b.AddFakeLogging()); 98using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(level));
Embeddings\LoggingEmbeddingGeneratorTests.cs (1)
31using var factory = LoggerFactory.Create(b => b.AddFakeLogging());
Embeddings\OpenTelemetryEmbeddingGeneratorTests.cs (1)
31using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)));
Image\LoggingImageGeneratorTests.cs (2)
32using var factory = LoggerFactory.Create(b => b.AddFakeLogging()); 101using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(level));
SpeechToText\LoggingSpeechToTextClientTests.cs (2)
34using var factory = LoggerFactory.Create(b => b.AddFakeLogging()); 101using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)).SetMinimumLevel(level));
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.cs (1)
77_logger = services.GetService<ILoggerFactory>()?.CreateLogger(typeof(HybridCache)) ?? NullLogger.Instance;
Microsoft.Extensions.Caching.Hybrid.Tests (3)
ServiceConstructionTests.cs (3)
629public CustomMemoryCache(IOptions<MemoryCacheOptions> options, ILoggerFactory loggerFactory) 642public CustomMemoryDistributedCache1(IOptions<MemoryDistributedCacheOptions> options, ILoggerFactory loggerFactory) 655public CustomMemoryDistributedCache2(IOptions<MemoryDistributedCacheOptions> options, ILoggerFactory loggerFactory)
Microsoft.Extensions.Caching.Memory (3)
MemoryCache.cs (2)
52public MemoryCache(IOptions<MemoryCacheOptions> optionsAccessor, ILoggerFactory? loggerFactory) 61public MemoryCache(IOptions<MemoryCacheOptions> optionsAccessor, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)
MemoryDistributedCache.cs (1)
33public MemoryDistributedCache(IOptions<MemoryDistributedCacheOptions> optionsAccessor, ILoggerFactory loggerFactory)
Microsoft.Extensions.DataIngestion (2)
IngestionPipeline.cs (1)
46ILoggerFactory? loggerFactory = default)
Processors\EnricherOptions.cs (1)
41public ILoggerFactory? LoggerFactory { get; set; }
Microsoft.Extensions.DataIngestion.Tests (5)
Processors\AlternativeTextEnricherTests.cs (1)
163using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)));
Processors\ClassificationEnricherTests.cs (1)
102using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)));
Processors\KeywordEnricherTests.cs (1)
102using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)));
Processors\SentimentEnricherTests.cs (1)
89using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)));
Processors\SummaryEnricherTests.cs (1)
86using ILoggerFactory loggerFactory = LoggerFactory.Create(b => b.AddProvider(new FakeLoggerProvider(collector)));
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (3)
TelemetryHealthChecksPublisherExtensionsTests.cs (3)
21.AddSingleton<ILoggerFactory, LoggerFactory>() 38.AddSingleton<ILoggerFactory, LoggerFactory>() 58.AddSingleton<ILoggerFactory, LoggerFactory>()
Microsoft.Extensions.Diagnostics.Testing.Tests (6)
Logging\FakeLoggerExtensionsTests.cs (6)
22var factory = serviceProvider.GetService<ILoggerFactory>(); 38var factory = serviceProvider.GetService<ILoggerFactory>(); 66var factory = serviceProvider.GetService<ILoggerFactory>()!;
Microsoft.Extensions.Hosting (9)
Host.cs (4)
26/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item> 47/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item> 70/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item> 90/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item>
HostApplicationBuilder.cs (2)
49/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item> 72/// <item><description>configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output</description></item>
HostApplicationBuilderSettings.cs (1)
37/// * configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output
HostingHostBuilderExtensions.cs (1)
189/// * configure the <see cref="ILoggerFactory"/> to log to the console, debug, and event source output
Internal\ConsoleLifetime.cs (1)
46public ConsoleLifetime(IOptions<ConsoleLifetimeOptions> options, IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, IOptions<HostOptions> hostOptions, ILoggerFactory loggerFactory)
Microsoft.Extensions.Hosting.Systemd (2)
SystemdLifetime.cs (2)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used to instantiate the lifetime logger.</param> 32public SystemdLifetime(IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, ISystemdNotifier systemdNotifier, ILoggerFactory loggerFactory)
Microsoft.Extensions.Hosting.WindowsServices (4)
WindowsServiceLifetime.cs (4)
31/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used to instantiate the lifetime logger.</param> 33public WindowsServiceLifetime(IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, ILoggerFactory loggerFactory, IOptions<HostOptions> optionsAccessor) 43/// <param name="loggerFactory">The <see cref="ILoggerFactory"/> used to instantiate the lifetime logger.</param> 46public WindowsServiceLifetime(IHostEnvironment environment, IHostApplicationLifetime applicationLifetime, ILoggerFactory loggerFactory, IOptions<HostOptions> optionsAccessor, IOptions<WindowsServiceLifetimeOptions> windowsServiceOptionsAccessor)
Microsoft.Extensions.Http (3)
DefaultHttpClientFactory.cs (1)
99() => _services.GetRequiredService<ILoggerFactory>().CreateLogger<DefaultHttpClientFactory>(),
Logging\LoggingHttpMessageHandlerBuilderFilter.cs (2)
18private ILoggerFactory LoggerFactory => field ??= _serviceProvider.GetRequiredService<ILoggerFactory>();
Microsoft.Extensions.Http.Resilience.PerformanceTests (2)
HttpClientFactory.cs (2)
54services.RemoveAll<ILoggerFactory>(); 55services.AddSingleton<ILoggerFactory>(NullLoggerFactory.Instance);
Microsoft.Extensions.Localization (3)
ResourceManagerStringLocalizerFactory.cs (3)
29private readonly ILoggerFactory _loggerFactory; 35/// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param> 38ILoggerFactory loggerFactory)
Microsoft.Extensions.Logging (8)
LoggerFactory.cs (7)
108/// Creates new instance of <see cref="ILoggerFactory"/> configured using provided <paramref name="configure"/> delegate. 111/// <returns>The <see cref="ILoggerFactory"/> that was created.</returns> 112public static ILoggerFactory Create(Action<ILoggingBuilder> configure) 117ILoggerFactory loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>(); 304private readonly ILoggerFactory _loggerFactory; 308public DisposingLoggerFactory(ILoggerFactory loggerFactory, ServiceProvider serviceProvider)
LoggingServiceCollectionExtensions.cs (1)
38services.TryAdd(ServiceDescriptor.Singleton<ILoggerFactory, LoggerFactory>());
Microsoft.Extensions.Logging.Abstractions (5)
LoggerFactoryExtensions.cs (2)
20public static ILogger<T> CreateLogger<T>(this ILoggerFactory factory) 32public static ILogger CreateLogger(this ILoggerFactory factory, Type type)
LoggerT.cs (2)
12/// provided <see cref="ILoggerFactory"/>. 25public Logger(ILoggerFactory factory)
NullLoggerFactory.cs (1)
7/// An <see cref="ILoggerFactory"/> used to create an instance of
Microsoft.Extensions.Logging.Console (16)
ConsoleLoggerExtensions.Obsolete.cs (16)
24public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Extensions.Configuration.IConfiguration configuration) 38public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Console.IConsoleLoggerSettings settings) 53public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Logging.LogLevel minLevel, bool includeScopes) 67public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Logging.LogLevel minLevel) 81public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, bool includeScopes) 96public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, System.Func<string, Logging.LogLevel, bool> filter, bool includeScopes) 110public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, System.Func<string, Logging.LogLevel, bool> filter) 123public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory)
Microsoft.Extensions.Logging.Debug (7)
DebugLoggerFactoryExtensions.cs (7)
13/// Extension methods for the <see cref="ILoggerFactory"/> class. 24public static ILoggerFactory AddDebug(this ILoggerFactory factory, LogLevel minLevel) => AddDebug(factory); 33public static ILoggerFactory AddDebug(this ILoggerFactory factory, Func<string, LogLevel, bool> filter) => AddDebug(factory); 41public static ILoggerFactory AddDebug(this ILoggerFactory factory)
Microsoft.Extensions.Logging.EventLog (7)
EventLoggerFactoryExtensions.cs (7)
15/// Extension methods for the <see cref="ILoggerFactory"/> class. 26public static ILoggerFactory AddEventLog(this ILoggerFactory factory, EventLog.EventLogSettings settings) 42public static ILoggerFactory AddEventLog(this ILoggerFactory factory, LogLevel minLevel) => 51public static ILoggerFactory AddEventLog(this ILoggerFactory factory) => AddEventLog(factory, LogLevel.Information);
Microsoft.Extensions.Logging.EventSource (5)
EventSourceLoggerFactoryExtensions.cs (5)
14/// Extension methods for the <see cref="ILoggerFactory"/> class. 22/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 25public static ILoggerFactory AddEventSourceLogger(this ILoggerFactory factory) 42/// cache loggers obtained from <see cref="ILoggerFactory"/> if the same category name will be used
Microsoft.Extensions.Logging.TraceSource (16)
TraceSourceFactoryExtensions.cs (16)
20/// <param name="factory">The <see cref="ILoggerFactory"/> to use.</param> 23/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 26public static ILoggerFactory AddTraceSource(this ILoggerFactory factory, System.Diagnostics.SourceSwitch sourceSwitch, System.Diagnostics.TraceListener listener) 40/// <param name="factory">The <see cref="ILoggerFactory"/> to use.</param> 42/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 45public static ILoggerFactory AddTraceSource(this ILoggerFactory factory, System.Diagnostics.SourceSwitch sourceSwitch) 58/// <param name="factory">The <see cref="ILoggerFactory"/> to use.</param> 61/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 64public static ILoggerFactory AddTraceSource(this ILoggerFactory factory, string switchName, System.Diagnostics.TraceListener listener) 78/// <param name="factory">The <see cref="ILoggerFactory"/> to use.</param> 80/// <returns>The <see cref="ILoggerFactory"/> so that additional calls can be chained.</returns> 83public static ILoggerFactory AddTraceSource(this ILoggerFactory factory, string switchName)
Microsoft.Extensions.Telemetry (4)
Logging\LoggingEnrichmentExtensions.cs (2)
64/// Adds a default implementation of the <see cref="ILoggerFactory"/> to the service collection. 72services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerFactory, ExtendedLoggerFactory>());
Sampling\SamplingLoggerBuilderExtensions.cs (2)
130builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerFactory, ExtendedLoggerFactory>()); 148builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerFactory, ExtendedLoggerFactory>());
Microsoft.Extensions.Telemetry.PerformanceTests (1)
ExtendedLoggerBench.cs (1)
100return serviceCollection.BuildServiceProvider().GetRequiredService<ILoggerFactory>().CreateLogger("Benchmark");
Microsoft.Extensions.Telemetry.Tests (33)
Buffering\GlobalBufferLoggerBuilderExtensionsTests.cs (1)
107using ILoggerFactory factory = Utils.CreateLoggerFactory(
Logging\ExtendedLoggerFactoryTests.cs (19)
23var factory = Utils.CreateLoggerFactory(); 32using var factory = Utils.CreateLoggerFactory(); 40var factory = Utils.CreateLoggerFactory(); 48var factory = Utils.CreateLoggerFactory(); 62var factory = Utils.CreateLoggerFactory(); 82using var factory = Utils.CreateLoggerFactory(); 111var factory = Utils.CreateLoggerFactory(); 197using var loggerFactory = Utils.CreateLoggerFactory(builder => 247using var loggerFactory = Utils.CreateLoggerFactory(builder => 280using var loggerFactory = Utils.CreateLoggerFactory(builder => 309using var loggerFactory = Utils.CreateLoggerFactory(builder => 337using var loggerFactory = Utils.CreateLoggerFactory(builder => 411using var loggerFactory = Utils.CreateLoggerFactory(builder => 435using var loggerFactory = Utils.CreateLoggerFactory(); 466using var loggerFactory = Utils.CreateLoggerFactory(); 479using var loggerFactory = Utils.CreateLoggerFactory(); 492using var loggerFactory = Utils.CreateLoggerFactory(); 534var factory = Utils.CreateLoggerFactory(builder => builder.Services.AddSingleton(_ => provider.Object)); 543using var factory = Utils.CreateLoggerFactory(builder =>
Logging\ExtendedLoggerTests.cs (8)
138using ILoggerFactory factory = Utils.CreateLoggerFactory( 678using var factory = Utils.CreateLoggerFactory( 706using var factory = Utils.CreateLoggerFactory( 736using var factory = Utils.CreateLoggerFactory( 771using var factory = Utils.CreateLoggerFactory( 927using ILoggerFactory factory = Utils.CreateLoggerFactory( 955using ILoggerFactory factory = Utils.CreateLoggerFactory( 988using ILoggerFactory factory = Utils.CreateLoggerFactory(
Logging\Utils.cs (5)
11public static ILoggerFactory CreateLoggerFactory(Action<ILoggingBuilder>? configure = null) 22ILoggerFactory loggerFactory = serviceProvider.GetRequiredService<ILoggerFactory>(); 28private readonly ILoggerFactory _loggerFactory; 32public DisposingLoggerFactory(ILoggerFactory loggerFactory, ServiceProvider serviceProvider)
Microsoft.Gen.Logging.Generated.Tests (1)
Utils.cs (1)
91var logger = serviceProvider.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(Utils));
Microsoft.Maui (5)
Hosting\EssentialsMauiAppBuilderExtensions.cs (1)
160 services.GetService<ILoggerFactory>()?
Hosting\MauiAppBuilder.cs (1)
179 Services.TryAdd(ServiceDescriptor.Singleton<ILoggerFactory, NullLoggerFactory>());
Hosting\ServiceProviderExtensions.cs (3)
15 context.Services.GetService<ILoggerFactory>()?.CreateLogger(type) ?? NullLogger.Instance; 24 services.GetService<ILoggerFactory>()?.CreateLogger(loggerName); 27 services.GetService<ILoggerFactory>()?.CreateLogger(type) ?? NullLogger.Instance;
Microsoft.Maui.Maps (3)
src\Core\src\Hosting\ServiceProviderExtensions.cs (3)
15 context.Services.GetService<ILoggerFactory>()?.CreateLogger(type) ?? NullLogger.Instance; 24 services.GetService<ILoggerFactory>()?.CreateLogger(loggerName); 27 services.GetService<ILoggerFactory>()?.CreateLogger(type) ?? NullLogger.Instance;
Microsoft.ML.GenAI.Samples (1)
Llama\SFT_Llama_3_2_1B.cs (1)
25using var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
Microsoft.NET.Build.Containers (8)
ContainerBuilder.cs (1)
44ILoggerFactory loggerFactory,
DestinationImageReference.cs (1)
66ILoggerFactory loggerFactory,
LocalDaemons\DockerCli.cs (2)
38public DockerCli(string? command, ILoggerFactory loggerFactory) 51public DockerCli(ILoggerFactory loggerFactory) : this(null, loggerFactory)
LocalDaemons\KnownLocalRegistryTypes.cs (1)
16internal static ILocalRegistry CreateLocalRegistry(string? type, ILoggerFactory loggerFactory)
Tasks\CreateImageIndex.cs (1)
56ILoggerFactory msbuildLoggerFactory = new LoggerFactory(new[] { loggerProvider });
Tasks\CreateNewImage.cs (2)
42ILoggerFactory msbuildLoggerFactory = new LoggerFactory(new[] { loggerProvider }); 81private async Task<bool> ExecuteAsyncCore(ILogger logger, ILoggerFactory msbuildLoggerFactory, CancellationToken cancellationToken)
Microsoft.TemplateEngine.Abstractions (1)
ITemplateEngineHost.cs (1)
45ILoggerFactory LoggerFactory { get; }
Microsoft.TemplateEngine.Edge (3)
DefaultTemplateEngineHost.cs (2)
24ILoggerFactory? loggerFactory = null) 54public ILoggerFactory LoggerFactory { get; }
Installers\NuGet\NuGetLogger.cs (1)
18internal NuGetLogger(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory)
Microsoft.TemplateEngine.Utils (1)
DefaultTemplateEngineHost.cs (1)
66public ILoggerFactory LoggerFactory { get; }
Stress.ApiService (2)
Program.cs (2)
236app.MapGet("/many-logs", (ILoggerFactory loggerFactory, CancellationToken cancellationToken) => 289app.MapGet("/log-formatting", (ILoggerFactory loggerFactory) =>