Fineboym.Logging.Generator 1.0.0

Additional Details

Deprecating because of the bug with void returning methods.

There is a newer version of this package available.
See the version list below for details.
dotnet add package Fineboym.Logging.Generator --version 1.0.0                
NuGet\Install-Package Fineboym.Logging.Generator -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fineboym.Logging.Generator" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Fineboym.Logging.Generator --version 1.0.0                
#r "nuget: Fineboym.Logging.Generator, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Fineboym.Logging.Generator as a Cake Addin
#addin nuget:?package=Fineboym.Logging.Generator&version=1.0.0

// Install Fineboym.Logging.Generator as a Cake Tool
#tool nuget:?package=Fineboym.Logging.Generator&version=1.0.0                

Logging Decorator Generator

Generates logger decorator class for an interface. Uses Microsoft.Extensions.Logging.ILogger<{Your interface}> to log and requires it in decorator class constructor.

Getting started

Use [DecorateWithLogger] attribute in Fineboym.Logging.Attributes namespace on an interface.

Prerequisites

Latest version of Visual Studio 2022.

Usage

using Fineboym.Logging.Attributes;

namespace SomeFolder.SomeSubFolder;

[DecorateWithLogger] // Default log level is Debug, applied to all methods.
public interface ISomeService
{
    DateTime SomeMethod(DateTime someDateTime);

    [LogMethod(Level = LogLevel.Information, EventId = 100)] // Override log level and event id.
    Task<string?> SomeAsyncMethod(string? s);
}

This will create a generated class named SomeServiceLoggingDecorator in the same namespace as the interface.

Additional documentation

If you use .NET dependency injection, then you can decorate your service interface using, for example, Scrutor-> https://github.com/khellang/Scrutor Go here for explanation-> https://andrewlock.net/adding-decorated-classes-to-the-asp.net-core-di-container-using-scrutor/

Feedback

Please go to https://github.com/DavidFineboym/LoggingDecoratorGenerator for feedback.

Product 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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

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
1.10.0 671 12/22/2023
1.9.0 1,982 9/23/2023
1.8.0 938 7/14/2023
1.7.0 946 6/16/2023
1.6.0 927 5/27/2023
1.5.0 1,006 5/20/2023
1.4.0 911 4/29/2023
1.3.1 880 4/26/2023
1.3.0 847 4/21/2023
1.2.0 1,120 3/31/2023
1.1.0 1,010 3/18/2023 1.1.0 is deprecated because it has critical bugs.
1.0.0 580 3/17/2023 1.0.0 is deprecated because it has critical bugs.
0.1.0-beta 1,045 12/25/2022 0.1.0-beta is deprecated because it is no longer maintained.