VtlSoftware.Logging
2023.1.5-preview
Prefix Reserved
dotnet add package VtlSoftware.Logging --version 2023.1.5-preview
NuGet\Install-Package VtlSoftware.Logging -Version 2023.1.5-preview
<PackageReference Include="VtlSoftware.Logging" Version="2023.1.5-preview" />
<PackageVersion Include="VtlSoftware.Logging" Version="2023.1.5-preview" />
<PackageReference Include="VtlSoftware.Logging" />
paket add VtlSoftware.Logging --version 2023.1.5-preview
#r "nuget: VtlSoftware.Logging, 2023.1.5-preview"
#:package VtlSoftware.Logging@2023.1.5-preview
#addin nuget:?package=VtlSoftware.Logging&version=2023.1.5-preview&prerelease
#tool nuget:?package=VtlSoftware.Logging&version=2023.1.5-preview&prerelease
Vtl Software Logging
This packakage is a collection of aspects created with Metalama that will allow you to easily add logging to a project or collection of projects in a solution.
It should be possible to use it with whichever Logging Framework is your framework of choice with the caveat that that framework support the ILogger interface provided by Microsoft.Extensions.Logging which in reality is the vast majority of them.
The package is open source and free to use.
Using VtlSoftware.Logging
After adding the package to your project you will need to configure a logging framework. Examples of how this can be done can be found in the package's help file which is available online. There are also numerous examples of how this can be done to be found online.
Once that has been done then using it is as simple as adding an attribute to those properties or methods that you want to be logged.
Provided Attributes
[LogMethod]
Adds logging to a method. Entry and Exit is logged along with details of any paramaeters that were passed into it. If applicable the method's return value is also logged.
[TimedLogMethod]
Exactly the same as the [LogMethod] attribute with the exception that the total duration that the method took to execute is also logged.
[LogProperty]
Adds logging to a property, specifically to the setter, recording both the old and new values.
[Redact]
This attribute will prevent sensitive parameters, or results, from being logged. To be more precise rather that an actual value being recorded the word 'redacted' is substituted. Typical usage is as shown below.
public bool ConfirmLogin(string userName, [Redact] string password)
{
//Do stuff here.
}
[NoLog]
When applied to a Class, Method or Property no logging of that entity will occur.
Fabric Extensions
A number of extion methods to provide Fabrics that will automate the process of adding logging attributes to your code base are also provided. You can find more details on how to use those in the help file.
Help and Support
A comprehensive help file can be found here.
You may contact us at support at vtlsoftware dot co dot uk to ask questions or report any issues.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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. 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. |
-
net6.0
- Metalama.Extensions.DependencyInjection (>= 2023.1.5-preview)
- Metalama.Framework (>= 2023.1.5-preview)
- Microsoft.Extensions.Logging.Console (>= 7.0.0)
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 |
|---|
Initial preview release