SerilogAnalyzer
SerilogAnalyzer copied to clipboard
Roslyn-based analysis for code using the Serilog logging library. Checks for common mistakes and usage problems.
I've seen it written that log messages should be fragments, and not sentences, and therefore we should avoid including a dot/period at the end of a log message, e.g.: ```csharp...
Analyser is installed as a project dependency and not a build dependency when installed from Nuget
 When installed SerilogAnalyzer, the package gets installed as a Project dependency rather than a build time dependency? Below is a sample from a FxCopAnalyzer installation where the visual studio...
I have been trying out the SerilogAnalyser. Unlike the examples in the Readme, I have Custom Logger Interface which has all the log methods. Since, we are moving to structured...
Example: This template is accepted by the analyzer: `"{Balance,10:#0.00}"` This isn't: `"{Balance,10:+#0.00;-#0.00;0.00}"` The problem is that the `+` in the format, is triggering: Serilog002: Error while parsing MessageTemplate: Found invalid...
Hi! Looks like the analyzer doesn't work if Nullable Reference Types are enabled Here is the example [ConsoleApp1.zip](https://github.com/Suchiman/SerilogAnalyzer/files/6325928/ConsoleApp1.zip) Just try to remove these lines in .csproj ``` enable ``` and...
Managed to get the refactorings to work by installing the VSIX package instead of NuGet. But if I have Resharper (latest, on VS2019 v16.0.2) then the refactoring (showing the config)...
I have created extension methods over Serilog's `ILogger`. When I call these method incorrectly, embedding an exception in the message template instead of passing it as the first parameter, I...
Please add analysis of ILogger messages from Microsoft.Extensions.Logging. E.g. I'm using Serilog with Microsoft.Extensions.Logging, but log messages with interpolation are not highlighted correctly. Inspections should run if both MS Logging...
We use wrappers around Serilog in our implementation. This means this analyzer didn't work for us since it was looking for specific namespaces. By allowing these namespaces to be updated...
I am developping a rather large asp net core project and thus using Microsoft.Extensions.Logging together with Serilog as logging provider. Now I'd like to use SerilogAnalyze in my solution. So...