Eliseev.LoggerAnalyzer 1.0.0

dotnet add package Eliseev.LoggerAnalyzer --version 1.0.0
                    
NuGet\Install-Package Eliseev.LoggerAnalyzer -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="Eliseev.LoggerAnalyzer" Version="1.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eliseev.LoggerAnalyzer" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Eliseev.LoggerAnalyzer">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Eliseev.LoggerAnalyzer --version 1.0.0
                    
#r "nuget: Eliseev.LoggerAnalyzer, 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.
#:package Eliseev.LoggerAnalyzer@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Eliseev.LoggerAnalyzer&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Eliseev.LoggerAnalyzer&version=1.0.0
                    
Install as a Cake Tool

LoggerAnalyzer

This project provides a Roslyn analyzer that validates the correct usage of ILogger<T> in constructor parameters.
According to common .NET logging patterns, each class should receive an ILogger<ClassName> instance so that log categories remain consistent and meaningful.

The analyzer helps enforce this convention across your codebase.

Rules

Rule ID Description Documentation
LOG001 ILogger<T> parameter type must match class name LOG001

What the analyzer checks

The analyzer triggers when:

  • A constructor receives a parameter of type ILogger<T>
  • The generic argument T does not match the containing class
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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.0.0 242 12/6/2025