AKS.Sql.Logger
The AKS.Sql.Logger NuGet package (version 1.1.5) is a lightweight logging utility designed for .NET 8 applications, enabling developers to log application events and exceptions directly into a SQL Server database.
Key Features
-
SQL Logging: Logs are stored in a SQL Server table named
Logs, which includes columns for timestamp, log level, category, message, and exception details. -
.NET 8 Compatibility: Fully compatible with .NET 8.0 and computed to work with .NET 9.0 and various platform-specific targets like Android, iOS, macOS, and Windows.
-
Simple Integration: Provides two primary methods:
Log()for general messages andLogException()for capturing exceptions.
🧱 Setup Instructions
-
Install the Package:
Using the .NET CLI:
-
Create the Logs Table:
Execute the following SQL script in your database:
-
Implement in Your .NET Application:
📦 Dependencies
-
Microsoft.Data.SqlClient(version ≥ 6.0.1) -
Microsoft.Extensions.Logging.Abstractions(version ≥ 8.0.2)NuGet Gallery | Home+1NuGet Gallery | Home+1
For more details or to download the package, visit the AKS.Sql.Logger NuGet page.
Comments
Post a Comment