Creates messages based on a human-readable formatted string. These messages are suitable for structured logging but are not optimal for machine analysis.
For more succinct code, consider including the using static PostSharp.Patterns.Diagnostics.FormattedMessageBuilder statement.
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Common.dll
Syntax
public static class FormattedMessageBuilderRemarks
The formatting string is not the one of Format(string, params object[]). Parameters are named and surrounded by curly brackets,
for example {BufferSize}, and are matched to the values by position, not by name. The formatting string must contain exactly
one parameter per value. The text between the brackets is passed to the logging backend as the parameter name, without further parsing,
so format specifiers are not supported. To write a literal curly bracket, double it ({{ or }}).
The values keep their own types and are rendered only when the message is written. Prefer this class over Format(string, params object[]) or interpolated strings, which build a string even when the logging level is disabled. When messages need to be counted or aggregated, use SemanticMessageBuilder instead.