EfueliteSolutionsDbLogger 1.0.3
dotnet add package EfueliteSolutionsDbLogger --version 1.0.3
NuGet\Install-Package EfueliteSolutionsDbLogger -Version 1.0.3
<PackageReference Include="EfueliteSolutionsDbLogger" Version="1.0.3" />
paket add EfueliteSolutionsDbLogger --version 1.0.3
#r "nuget: EfueliteSolutionsDbLogger, 1.0.3"
// Install EfueliteSolutionsDbLogger as a Cake Addin #addin nuget:?package=EfueliteSolutionsDbLogger&version=1.0.3 // Install EfueliteSolutionsDbLogger as a Cake Tool #tool nuget:?package=EfueliteSolutionsDbLogger&version=1.0.3
Efuelite Solutions Database Logger
This is a simple to implement but lightweight and highly efficient package used to log informations from .Net applications to Database
Usage
In class where Efuelite Db Logger is to be used, just import the name space EfueliteSolutionsDbLogger.
To log an information, call
string status = DbLogger.WriteLog(string DBConnectionString, string Log);
This function returns a string status telling the outcome of its operation.Parameters:
- Supply connection string to the database(mssql) where it will log information.
- The information to log in string format.
To read/search all information from logs, just call
var obj = DbLogger.SearchLog(string DBConnectionString, string SearchCrit = "", string Sort = "0", int PageNumber = 1, int PageSize = 10, DateTime? StartDate = null, DateTime? EndDate = null);
Parameters:
- DBConnectionString: Database connection string
- SearchCrit: Optional: phrase to search for when retrieving logs
- Sort: Optional: default value is "0" which is descending order by logdate
- PageNumber: Optional: default value is 1, meaning search returns records from page 1
- PageSize: Optional: default value is 10, menaing search returns 10 records per page
- StartDate: Optional: default value is todays date. If there is no log for today, then no result is returned
- EndDate: Optional: default value is todays date. If there is no log for today, then no result is returned
- Returns a model list with log properties such as Total, Status, LogId, LogDescription, LogDate in UTC format.
To delete logs, just call
string status = DbLogger.DeleteLog(string DBConnectionString, string LogId);
This function returns a string status telling the outcome of its operation. Parameters:
- Supply connection string to the database(mssql).
- Supply the LogID of the Log to be deleted.
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. |
-
net8.0
- EfueliteSolutionsDBReader (>= 1.0.1)
- System.Data.SqlClient (>= 4.8.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
A simple lightweight logger