AKSSqlLogger 1.1.3

dotnet add package AKSSqlLogger --version 1.1.3
                    
NuGet\Install-Package AKSSqlLogger -Version 1.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AKSSqlLogger" Version="1.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AKSSqlLogger" Version="1.1.3" />
                    
Directory.Packages.props
<PackageReference Include="AKSSqlLogger" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AKSSqlLogger --version 1.1.3
                    
#r "nuget: AKSSqlLogger, 1.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AKSSqlLogger@1.1.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AKSSqlLogger&version=1.1.3
                    
Install as a Cake Addin
#tool nuget:?package=AKSSqlLogger&version=1.1.3
                    
Install as a Cake Tool

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)

https://www.paypal.com/donate/?business=S7DJDFNKDP2AL&no_recurring=0&item_name=Please+support+to+manage+this+account&currency_code=USD

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.3 149 4/19/2025
1.1.1 405 4/14/2025 1.1.1 is deprecated because it is no longer maintained.
1.1.0 407 4/14/2025 1.1.0 is deprecated because it is no longer maintained.
1.0.0 406 4/14/2025 1.0.0 is deprecated because it is no longer maintained.