Oakrey.Log.Abstractions
3.0.0
dotnet add package Oakrey.Log.Abstractions --version 3.0.0
NuGet\Install-Package Oakrey.Log.Abstractions -Version 3.0.0
<PackageReference Include="Oakrey.Log.Abstractions" Version="3.0.0" />
<PackageVersion Include="Oakrey.Log.Abstractions" Version="3.0.0" />
<PackageReference Include="Oakrey.Log.Abstractions" />
paket add Oakrey.Log.Abstractions --version 3.0.0
#r "nuget: Oakrey.Log.Abstractions, 3.0.0"
#:package Oakrey.Log.Abstractions@3.0.0
#addin nuget:?package=Oakrey.Log.Abstractions&version=3.0.0
#tool nuget:?package=Oakrey.Log.Abstractions&version=3.0.0
Oakrey.Log.Abstractions
1. Overview
The "Log.Abstractions" project provides shared contracts and infrastructure for Oakrey logging packages. It contains logger interfaces, log levels, log entry models, logger factory/proxy support, optional secret sanitizer contracts, and common logging utilities used by Oakrey.Log and related platform packages.
2. Features
Logging Contracts:
- ILogger: Defines the common application logging API for Trace, Debug, Information, Warning, Error, and Critical messages.
- ILogger<T>: Provides a typed logger contract for module-specific logging.
- ILoggerEngine: Defines the low-level sink contract used by logger implementations.
Logging Levels:
- Supports standard logging levels: Trace, Debug, Information, Warning, Error, and Critical (Level enum).
- Provides short string, display name, and parsing helpers for log levels.
Logger Management:
- LoggerFactory: Manages logger instances, global thresholds, module-specific filters, and optional secret sanitization.
- LoggerProxy: Provides module-specific logger instances backed by the shared logger factory.
Secret Sanitization Contracts:
- ILogSecretSanitizer: Allows plugging in a sanitizer that can redact log entries before they reach logger sinks.
- EmptyLogSecretSanitizer: Default no-op sanitizer used to avoid overhead in applications that do not need secret redaction.
- SecretSanitizationResult: Represents sanitizer output and redaction metadata.
- Concrete sanitizers are provided by the optional
Oakrey.Log.Sanitizerspackage.
Log Entry Representation:
- LogEntry: Represents a single log entry with level, module, message, arguments, formatted message, and timestamp.
Utilities:
- LoggerHelper: Provides safe message formatting and level helper methods.
- LoggerExtensions: Provides convenience methods for entering, leaving, and safely executing logged actions.
- ExceptionsHandling: Flattens nested exception messages for better readability.
Extensibility:
- LoggerBase: Abstract base class for custom logger implementations.
- Concrete loggers are provided by
Oakrey.Log,Oakrey.Log.Windows, and related packages.
3. Installation
You can install the package via NuGet Package Manager, Package Manager Console or the .NET CLI.
NuGet Package Manager
- Open your project in Visual Studio.
- Navigate to Tools > NuGet Package Manager > Manage NuGet Packages for Solution....
- Search for
Oakrey.Log.Abstractionsand click Install.
.NET CLI
Run the following command in your terminal:
dotnet add package Oakrey.Log.Abstractions
Package Manager Console
Run the following command in your Package Manager Console:
Install-Package Oakrey.Log.Abstractions
4. Usage
Secret sanitization is disabled by default through EmptyLogSecretSanitizer, so logging stays lightweight unless an application explicitly configures a real sanitizer.
LoggerFactory.UseEmptySecretSanitizer();
Applications that need secret redaction can reference Oakrey.Log.Sanitizers and configure a concrete sanitizer:
LoggerFactory.SetSecretSanitizer(new DefaultSecretSanitizer());
When a configured sanitizer redacts a value, LoggerFactory emits a warning entry with metadata about the event. The warning does not include the original secret value.
5. Requirements
- .NET 10 or higher
6. Project Information
- Author: Oakrey
- Company: Oakrey (Website Link)
- License: MIT
- Repository: Git Repository
- Project URL: Project Website
7. Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve the package.
8. License
This project is licensed under the MIT License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages (38)
Showing the top 5 NuGet packages that depend on Oakrey.Log.Abstractions:
| Package | Downloads |
|---|---|
|
Oakrey.Applications.Settings
WPF-only (.NET 10 Windows) library providing ISettingsService with persistent and volatile typed key-value settings, SettingsBase for bindable ViewModelBase-derived settings classes, CallerMemberName key inference, built-in window bounds restore via RestoreBounds, and explicit dependency-injection integration. |
|
|
Oakrey.Log
A flexible and extensible logging framework for .NET applications, supporting multiple logging mechanisms, custom loggers, and advanced log management features |
|
|
Oakrey.Applications.UI
WPF UI library providing a DarkWindow base class with native DWM Mica and Acrylic backdrops, a TabbedWindow with animated page transitions and Windows light/dark theme detection, a notification bar service, and severity-typed message box and prompt dialogs. |
|
|
Oakrey.Applications.License
Provides application license management for .NET WPF apps: signature and threshold-based validation, trial and expiration support, reactive license status via IObservable<bool>, custom exception types, and a ready-made LicenseWindow WPF dialog. |
|
|
Oakrey.Applications.SplashScreen
Windows (.NET 10, WPF) library for async splash screens with parallel preload tasks and MSI update flow. Generic SplashScreenService<T> integrates IApplicationInfo metadata, Oakrey.Log, and Oakrey.Telemetry; registers via a single IServiceCollection extension. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 392 | 7/10/2026 |