Suchiman / SerilogAnalyzer

Roslyn-based analysis for code using the Serilog logging library. Checks for common mistakes and usage problems.
Apache License 2.0
309 stars 29 forks source link

Refactoring from string concatination to message template #22

Closed kevygreen closed 7 years ago

kevygreen commented 7 years ago

It would be great if in Serilog could refactor string concatenation to message template. I know ReSharper has a refactoring that allow you to convert string concatenation into interpolation, from there you can go to message template, but it would be great to do it in one step. With ReSharper you have to select the whole string you want to change to interpolation before it will work. I think VS2017 might have added something in fro string concatenation to interpolation as well. This would help people convert to Serilog as you could apply it document/project/solution wide for quick conversion to message templates.

Suchiman commented 7 years ago

Good idea, i've already implemented this for string.format and string interpolation but i totally forgot about string concat.