An extension for ReSharper and Rider IDE that highlights structured logging templates and contains some useful analyzers
At the moment it supports Serilog, NLog, and Microsoft.Extensions.Logging
Look for Structured Logging
in ReSharper -> Extension manager.
JetBrains Plugins Repository
Look for Structured Logging
in Settings -> Plugins -> Browse repositories.
JetBrains Plugins Repository
- Anonymous object is not destructured
- Complex object is not destructured
- Complex object is not destructured in context
- Contextual logger mismatch
- Exception passed as a template argument
- Duplicate properties in a template
- Template should be a compile-time constant
- Prefer named properties instead of positional ones
- Inconsistent log property naming
- Inconsistent log property naming in context
- Log event messages should be fragments, not sentences
Inspired by SerilogAnalyzer