AKSSqlLogger 1.1.3
dotnet add package AKSSqlLogger --version 1.1.3
NuGet\Install-Package AKSSqlLogger -Version 1.1.3
<PackageReference Include="AKSSqlLogger" Version="1.1.3" />
<PackageVersion Include="AKSSqlLogger" Version="1.1.3" />
<PackageReference Include="AKSSqlLogger" />
paket add AKSSqlLogger --version 1.1.3
#r "nuget: AKSSqlLogger, 1.1.3"
#:package AKSSqlLogger@1.1.3
#addin nuget:?package=AKSSqlLogger&version=1.1.3
#tool nuget:?package=AKSSqlLogger&version=1.1.3
The AKSSqlLogger NuGet package (version 1.1.3) is designed to log application events into a SQL Server database. It targets .NET 8.0 and is compatible with higher versions, including .NET 9.0 and various platform-specific variants such as Android, iOS, and Windows.NuGet Gallery | Home
Key Features SQL Logging: Logs application events and exceptions into a SQL Server table.
Simple API: Provides two methods: Log for general messages and LogException for exceptions.
Lightweight Integration: Easily integrates into .NET applications using Microsoft.Extensions.Logging.
Setup Instructions Create the Logs Table: Execute the following SQL script in your database:NuGet Gallery | Home+1NuGet Gallery | Home+1
sql
CREATE TABLE Logs ( Id INT IDENTITY(1,1) PRIMARY KEY, Timestamp DATETIME, LogLevel NVARCHAR(50), Category NVARCHAR(100), Message NVARCHAR(MAX), Exception NVARCHAR(MAX) null ); Install the Package: Use the following command in your .NET project:NuGet Gallery | Home+8NuGet Gallery | Home+8NuGet Gallery | Home+8
bash
dotnet add package AKSSqlLogger --version 1.1.3 Implement Logging: In your application code:
csharp
using Microsoft.Extensions.Logging; using AKS.Sql.Logger;
AKSSqlLogger logger = new AKSSqlLogger("YourCategory", "Server=YourServer;Database=YourDB;Trusted_Connection=True;TrustServerCertificate=True;");
logger.Log(LogLevel.Information, "Record is saved successfully");
try { // Your code here } catch (Exception ex) { logger.LogException(LogLevel.Error, ex); } Dependencies
Microsoft.Data.SqlClient (>= 6.0.1)
Microsoft.Extensions.Logging.Abstractions (>= 10.0.0-preview.3.25171.5)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net8.0
- Microsoft.Data.SqlClient (>= 6.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0-preview.3.25171.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.