CoreLogger 2.1.48
See the version list below for details.
dotnet add package CoreLogger --version 2.1.48
NuGet\Install-Package CoreLogger -Version 2.1.48
<PackageReference Include="CoreLogger" Version="2.1.48" />
paket add CoreLogger --version 2.1.48
#r "nuget: CoreLogger, 2.1.48"
// Install CoreLogger as a Cake Addin #addin nuget:?package=CoreLogger&version=2.1.48 // Install CoreLogger as a Cake Tool #tool nuget:?package=CoreLogger&version=2.1.48
CoreLoggerSuite A powerfull utility for ASP Net Core MVC application to manage logs.
CoreLogger is a easy tool for logging form Core Application. CoreLogger can log in txt file, SQLite db file or MS SQL Server, at same time!
You can use at runtime with CoreLogger class, or in ASP Core application with CoreLoggerMiddelware.
How to use Configure the option class in StartUp.CofigureServices:
public void ConfigureServices(IServiceCollection services)
{
/**
* This is the configuration to be able to use CoreLogger in the application
*/
services.ConfigureCoreLogger(o =>
{
/**
* Base and Middleware
*/
o.MinLevel = Microsoft.Extensions.Logging.LogLevel.Trace;
o.File_FolderPath = System.IO.Path.Combine(_environment.WebRootPath, "App_Log");
o.SQLite_FullPath = System.IO.Path.Combine(_environment.WebRootPath, "Log.db3");
//o.SQL_ConnectionString = "To use SQL indicate here the connection string";
/**
* Inspector
*/
o.Title = "CoreLoggerInspector Test";
o.Description = "CoreLoggerInspector Test MVC App";
o.Contacts = new Contact[]
{
new Contact()
{
Name = "Jhon Doe",
Role = "Tech Support",
Mobile = "123456789",
Email = "jdoe@example.com"
},
new Contact()
{
Name = "Adam Smith",
Role = "Tech Support",
Mobile = "123456789",
Email = "asmith@example.com"
}
};
o.Environments = new EnvConfiguration[]
{
new EnvConfiguration()
{
EnvironmentName = "Development",
UseAuthentication = new Credentials()
{
Username = "admin",
Password = "password",
Expiring = TimeSpan.FromMinutes(20)
}
},
new EnvConfiguration()
{
EnvironmentName = "Production",
DenyEnvironmet = true
}
};
});
}
Indicate the app to use the middleware (optional) an the inspector (optional, route "/corelogger"):
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
/**
* This indicates to application to use the miidleware to automatically log errors (always),
* warnings and traces (optional based on the minimum level set)
*/
app.UseMiddleware<CoreLoggerMiddleware>();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
/**
* This loads the necessary views to view the logs into the application,
* using "/corelogger" route
*/
app.UseCoreLoggerInspector();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});
}
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 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- CoreLogger.Configuration (>= 1.0.6)
- CoreLogger.Inspector (>= 1.5.48)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (>= 3.1.3)
- Microsoft.EntityFrameworkCore (>= 3.1.3)
- Microsoft.EntityFrameworkCore.Abstractions (>= 3.1.3)
- Microsoft.EntityFrameworkCore.Sqlite (>= 3.1.3)
- Microsoft.EntityFrameworkCore.SqlServer (>= 3.1.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.