TCIS.Logging.Autofac
1.0.1-rc.7
See the version list below for details.
dotnet add package TCIS.Logging.Autofac --version 1.0.1-rc.7
NuGet\Install-Package TCIS.Logging.Autofac -Version 1.0.1-rc.7
<PackageReference Include="TCIS.Logging.Autofac" Version="1.0.1-rc.7" />
<PackageVersion Include="TCIS.Logging.Autofac" Version="1.0.1-rc.7" />
<PackageReference Include="TCIS.Logging.Autofac" />
paket add TCIS.Logging.Autofac --version 1.0.1-rc.7
#r "nuget: TCIS.Logging.Autofac, 1.0.1-rc.7"
#:package TCIS.Logging.Autofac@1.0.1-rc.7
#addin nuget:?package=TCIS.Logging.Autofac&version=1.0.1-rc.7&prerelease
#tool nuget:?package=TCIS.Logging.Autofac&version=1.0.1-rc.7&prerelease
TCIS.Logging.Autofac
A module supporting AOP (Aspect-Oriented Programming) for the logging system in TCIS, utilizing the Autofac library.
🌟 Overview
TCIS.Logging.Autofac replaces the default .NET DI Container with Autofac. Specifically, it provides:
- Assembly Scanning: Automatically scans and registers Services by Suffixes.
- AOP Interception: Automatically intercepts function calls to consistently log input parameters, execution time, and exceptions, without requiring repetitive logging code in the Business Logic.
📦 Installation
Install the package via .NET CLI:
dotnet add package TCIS.Logging.Autofac
⚙️ Configuration (appsettings.json)
You can customize AOP configurations (e.g., the list of suffixes to auto-register) in the TLogSettings:AopSettings section (default):
{
"TLogSettings": {
"AopSettings": {
"DiRegistrationSuffixes": [ "Service", "Repository", "Manager" ]
}
}
}
🚀 Usage
In Program.cs, configure the IHostBuilder to use UseTAutofacLogging:
using Microsoft.Extensions.Hosting;
using System.Reflection;
var builder = WebApplication.CreateBuilder(args);
// Configure Autofac as the main DI Container and configure AOP Logging
builder.Host.UseTAutofacLogging(
scanAssemblies: new[] { Assembly.GetExecutingAssembly() }, // Scan the current Assembly
configSection: "TLogSettings:AopSettings", // Configuration section
configureOptions: options =>
{
// Can be configured via code instead of appsettings
options.DiRegistrationSuffixes.Add("Facade");
}
);
var app = builder.Build();
app.Run();
💡 Basic Example
When you have an Interface and an implementation Class with a name ending in Service (e.g., IUserService and UserService):
public interface IUserService
{
Task<User> GetUserAsync(int id);
}
// This class will be automatically registered by Autofac (due to the 'Service' suffix)
// and automatically intercepted to log Input, Output, and Exceptions.
public class UserService : IUserService
{
public async Task<User> GetUserAsync(int id)
{
return await _db.Users.FindAsync(id);
}
}
By simply configuring UseTAutofacLogging(), you no longer need to manually register builder.Services.AddScoped<IUserService, UserService>().
| 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 is compatible. 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
- Autofac (>= 8.1.1)
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Autofac.Extras.DynamicProxy (>= 7.1.0)
- Castle.Core.AsyncInterceptor (>= 2.1.0)
- Elastic.CommonSchema (>= 8.11.0)
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.0)
- Microsoft.Bcl.TimeProvider (>= 9.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- System.Diagnostics.DiagnosticSource (>= 9.0.0)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
- System.Threading.Channels (>= 8.0.0)
- TCIS.Logging (>= 1.0.1-rc.7)
-
net8.0
- Autofac (>= 8.1.1)
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Autofac.Extras.DynamicProxy (>= 7.1.0)
- Castle.Core.AsyncInterceptor (>= 2.1.0)
- Elastic.CommonSchema (>= 8.11.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- System.Diagnostics.DiagnosticSource (>= 10.0.0)
- System.Text.Encodings.Web (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
- System.Threading.Channels (>= 8.0.0)
- TCIS.Logging (>= 1.0.1-rc.7)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on TCIS.Logging.Autofac:
| Package | Downloads |
|---|---|
|
TCIS.Pluggable.Engine.Autofac
TCIS Core Framework is an application framework for building modular, multi-tenant applications on ASP.NET Core. Autofac integration for TCIS.Pluggable.Engine |
|
|
TCIS.Logging.Hosting
One-call TCIS application logging composition, startup lifecycle and downstream failure attribution. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1-rc.10 | 52 | 10/8/2026 |
| 1.0.1-rc.9 | 41 | 10/8/2026 |
| 1.0.1-rc.8 | 55 | 10/8/2026 |
| 1.0.1-rc.7 | 48 | 10/8/2026 |
| 1.0.1-rc.6 | 54 | 10/8/2026 |
| 1.0.1-rc.4 | 49 | 10/7/2026 |
| 1.0.1-rc.3 | 47 | 10/7/2026 |
| 1.0.1-rc.2 | 66 | 10/5/2026 |
| 1.0.1-rc.1 | 55 | 10/5/2026 |
| 1.0.0 | 115 | 10/1/2026 |
| 1.0.0-rc.52 | 66 | 9/29/2026 |
| 1.0.0-rc.51 | 82 | 9/23/2026 |
| 1.0.0-rc.50 | 70 | 9/21/2026 |
| 1.0.0-rc.49 | 80 | 9/18/2026 |
| 1.0.0-rc.47 | 73 | 9/17/2026 |
| 1.0.0-rc.46 | 73 | 9/17/2026 |
| 1.0.0-rc.45 | 132 | 9/11/2026 |
| 1.0.0-rc.44 | 83 | 9/10/2026 |
| 1.0.0-rc.43 | 73 | 9/10/2026 |
| 1.0.0-rc.42 | 91 | 9/9/2026 |