DropBear.Codex.AppLogger
2024.4.7
See the version list below for details.
dotnet add package DropBear.Codex.AppLogger --version 2024.4.7
NuGet\Install-Package DropBear.Codex.AppLogger -Version 2024.4.7
<PackageReference Include="DropBear.Codex.AppLogger" Version="2024.4.7" />
paket add DropBear.Codex.AppLogger --version 2024.4.7
#r "nuget: DropBear.Codex.AppLogger, 2024.4.7"
// Install DropBear.Codex.AppLogger as a Cake Addin #addin nuget:?package=DropBear.Codex.AppLogger&version=2024.4.7 // Install DropBear.Codex.AppLogger as a Cake Tool #tool nuget:?package=DropBear.Codex.AppLogger&version=2024.4.7
DropBear.Codex.AppLogger
Description
DropBear.Codex.AppLogger
is a flexible and configurable logging library designed to wrap around existing logging frameworks. It provides a fluent API for configuring logging behavior, including support for console and file outputs, custom log formats, and more. The library aims to make logging in .NET applications straightforward and adaptable.
Features
- Fluent API for easy configuration
- Supports console and file logging
- Integrates with ZLogger
- Provides extension methods for easy setup with dependency injection containers
Getting Started
To use DropBear.Codex.AppLogger
in your project, start by configuring the logger factory according to your needs:
Basic Configuration
var loggerFactory = new LoggerConfigurationBuilder()
.SetLogLevel(LogLevel.Information)
.EnableConsoleOutput(true)
.Build();
var logger = loggerFactory.CreateLogger<MyClass>();
logger.LogInformation("Hello, World!");
Advanced Configuration with File Logging
var loggerFactory = new LoggerConfigurationBuilder()
.SetLogLevel(LogLevel.Debug)
.EnableConsoleOutput(true)
.UseJsonFormatter()
.ConfigureRollingFile("logs/", 1024)
.Build();
var logger = loggerFactory.CreateLogger<MyClass>();
logger.LogDebug("Debugging information.");
Integration with ASP.NET Core
DropBear.Codex.AppLogger
can be easily integrated into ASP.NET Core applications using the provided extension method:
public void ConfigureServices(IServiceCollection services)
{
services.AddAppLogger(builder =>
{
builder.SetLogLevel(LogLevel.Information)
.EnableConsoleOutput(true)
.UseJsonFormatter()
.ConfigureRollingFile("logs/", 1024);
});
}
Warning
This code is under active pre-development and is subject to change. It may or may not work as expected and should be used with caution in production environments.
Contributing
We welcome contributions and suggestions! Please submit issues and pull requests on our GitHub repository for any features or bug fixes.
License
This project is licensed under the LGPLv3 License - see the https://www.gnu.org/licenses/lgpl-3.0.en.html for details.
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
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
- ZLogger (>= 2.4.1)
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 | |
---|---|---|---|
2024.7.3 | 178 | 7/24/2024 | |
2024.4.14 | 707 | 4/26/2024 | |
2024.4.12 | 132 | 4/26/2024 | |
2024.4.10 | 311 | 4/16/2024 | |
2024.4.9 | 156 | 4/12/2024 | |
2024.4.8 | 139 | 4/7/2024 | |
2024.4.7 | 135 | 4/5/2024 | |
2024.4.5 | 140 | 4/5/2024 | |
2024.4.4 | 115 | 4/5/2024 | |
2024.4.2 | 156 | 4/3/2024 | |
2024.4.1 | 142 | 4/3/2024 | |
2024.3.6 | 327 | 3/29/2024 | |
2024.3.5 | 130 | 3/29/2024 | |
2024.3.4 | 236 | 3/21/2024 | |
2024.3.3 | 155 | 3/21/2024 | |
2024.3.2 | 177 | 3/20/2024 |