Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Commit 91748ad

Browse files
deathgoretanspaygo
authored andcommitted
ExceptionAsObjectJsonFormatter add renderMessageTemplate param (#304)
* ExceptionAsObjectJsonFormatter add renderMessageTemplate * double slashes removed. Co-authored-by: tanspaygo <[email protected]>
1 parent b08b28a commit 91748ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Serilog.Formatting.Elasticsearch/ExceptionAsObjectJsonFormatter.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,18 @@ public class ExceptionAsObjectJsonFormatter : ElasticsearchJsonFormatter
4242
/// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
4343
/// <param name="serializer">Inject a serializer to force objects to be serialized over being ToString()</param>
4444
/// <param name="inlineFields">When set to true values will be written at the root of the json document</param>
45+
/// <param name="renderMessageTemplate">If true, the message template will be rendered and written to the output as a
46+
/// property named RenderedMessageTemplate.</param>
4547
/// <param name="formatStackTraceAsArray">If true, splits the StackTrace by new line and writes it as a an array of strings</param>
4648
public ExceptionAsObjectJsonFormatter(bool omitEnclosingObject = false,
4749
string closingDelimiter = null,
4850
bool renderMessage = false,
4951
IFormatProvider formatProvider = null,
5052
ISerializer serializer = null,
5153
bool inlineFields = false,
54+
bool renderMessageTemplate = true,
5255
bool formatStackTraceAsArray = false)
53-
: base(omitEnclosingObject, closingDelimiter, renderMessage, formatProvider, serializer, inlineFields, true, formatStackTraceAsArray)
56+
: base(omitEnclosingObject, closingDelimiter, renderMessage, formatProvider, serializer, inlineFields, renderMessageTemplate, formatStackTraceAsArray)
5457
{
5558
}
5659

0 commit comments

Comments
 (0)