Skip to content

Commit fcecc68

Browse files
committed
Report the number of escape characters formatted into themed sequence rendering
1 parent 49df3e6 commit fcecc68

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Serilog.Sinks.Console/Sinks/SystemConsole/Formatting/ThemedJsonValueFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected override int VisitSequenceValue(ThemedValueFormatterState state, Seque
7070
}
7171

7272
delim = ", ";
73-
Visit(state.Nest(), sequence.Elements[index]);
73+
count += Visit(state.Nest(), sequence.Elements[index]);
7474
}
7575

7676
using (ApplyStyle(state.Output, ConsoleThemeStyle.TertiaryText, ref count))

src/Serilog.Sinks.Console/Sinks/SystemConsole/Output/ExceptionTokenRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ExceptionTokenRenderer : OutputTemplateTokenRenderer
2525

2626
readonly ConsoleTheme _theme;
2727

28-
public ExceptionTokenRenderer(ConsoleTheme theme, PropertyToken pt)
28+
public ExceptionTokenRenderer(ConsoleTheme theme)
2929
{
3030
_theme = theme;
3131
}

src/Serilog.Sinks.Console/Sinks/SystemConsole/Output/OutputTemplateRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public OutputTemplateRenderer(ConsoleTheme theme, string outputTemplate, IFormat
5252
}
5353
else if (pt.PropertyName == OutputProperties.ExceptionPropertyName)
5454
{
55-
renderers.Add(new ExceptionTokenRenderer(theme, pt));
55+
renderers.Add(new ExceptionTokenRenderer(theme));
5656
}
5757
else if (pt.PropertyName == OutputProperties.MessagePropertyName)
5858
{

0 commit comments

Comments
 (0)