Cogito.Extensions.Logging.Autofac
3.0.4
dotnet add package Cogito.Extensions.Logging.Autofac --version 3.0.4
NuGet\Install-Package Cogito.Extensions.Logging.Autofac -Version 3.0.4
<PackageReference Include="Cogito.Extensions.Logging.Autofac" Version="3.0.4" />
<PackageVersion Include="Cogito.Extensions.Logging.Autofac" Version="3.0.4" />
<PackageReference Include="Cogito.Extensions.Logging.Autofac" />
paket add Cogito.Extensions.Logging.Autofac --version 3.0.4
#r "nuget: Cogito.Extensions.Logging.Autofac, 3.0.4"
#:package Cogito.Extensions.Logging.Autofac@3.0.4
#addin nuget:?package=Cogito.Extensions.Logging.Autofac&version=3.0.4
#tool nuget:?package=Cogito.Extensions.Logging.Autofac&version=3.0.4
Cogito.Extensions.Logging.Autofac
Makes ILogger and ILogger<T> resolvable from an Autofac container.
Why
ILogger<T> depends on the type it is injected into, which a container has to special-case. Without
that, every component either takes ILoggerFactory and creates its own, or you register a logger per
type by hand.
Install
dotnet add package Cogito.Extensions.Logging.Autofac
Use
The assembly module registers itself, so with module scanning there is nothing to call:
builder.RegisterAllAssemblyModules();
After which any component can take a logger:
public class Importer
{
public Importer(ILogger<Importer> logger) { ... }
}
ILogger<T> is resolved for the consuming type, and a non-generic ILogger is available too.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Cogito.Autofac (>= 6.1.3)
- Cogito.Extensions.Logging (>= 3.0.4)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Cogito.Extensions.Logging.Autofac:
| Package | Downloads |
|---|---|
|
Cogito.MassTransit.Autofac
Alternative Autofac integration for MassTransit. |
|
|
Cogito.Extensions.Logging.Serilog.Autofac
Configures the Autofac container to forward Microsoft.Extensions.Logging messages to the Serilog logger. |
|
|
Cogito.AspNetCore.Autofac
Various utilities and extensions for working with Autofac and ASP.Net Core. |
|
|
Cogito.Components.MassTransit
Provides automatic configuration of the MassTransit Bus. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.4 | 0 | 11/28/2026 |
| 3.0.3 | 321 | 9/14/2026 |
| 3.0.2 | 151 | 9/14/2026 |
| 3.0.1 | 838 | 9/10/2026 |
| 3.0.0 | 3,623 | 12/20/2024 |
| 2.0.20 | 45,407 | 10/29/2020 |
| 2.0.19 | 942 | 10/28/2020 |
| 2.0.18 | 910 | 10/28/2020 |
| 2.0.15 | 1,412 | 10/28/2020 |
| 2.0.14 | 2,212 | 10/18/2020 |
| 2.0.12 | 17,939 | 8/7/2020 |
| 2.0.11 | 957 | 8/7/2020 |
| 2.0.10 | 1,018 | 8/7/2020 |
| 2.0.6 | 1,136 | 6/30/2020 |
| 2.0.5 | 1,257 | 3/2/2020 |
| 2.0.4 | 1,168 | 2/7/2020 |
| 2.0.2 | 1,063 | 2/7/2020 |
| 2.0.1 | 1,085 | 2/7/2020 |
| 2.0.0 | 1,121 | 2/6/2020 |
| 1.1.8 | 1,068 | 2/6/2020 |