Skip to content
| Marketplace
Sign in
Visual Studio>Tools>UDIR.PAS2.MessageTemplateAnalyzer
UDIR.PAS2.MessageTemplateAnalyzer

UDIR.PAS2.MessageTemplateAnalyzer

Espen Ekvang

|
16 installs
| (0) | Free
An extension to help to write valid messagetemplates for logging.
Download

When using Serilog for logging it is important to not introduce whitespaces for variables in messagetemplate when the template is used for sinks to for example Elastic search. Following is an invalid example:

Ex: "An invalid string with variable { var1 }."

A string like this will not parse correctly, hence you will lose the variable when writing to a log destination.

The extension will highlight as warning strings that violates the no-whitespace requirement and suggest to remove whitespaces such that the example over resolves to:

"An invalid string with variable {vra1}."

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft