int RenderValue(HtmlTheme theme, ThemedValueFormatter valueFormatter, LogEventPropertyValue propertyValue, TextWriter output, string format) { if (_isLiteral && propertyValue is ScalarValue sv && sv.Value is string) { using (theme.Apply(output, HtmlThemeStyle.String)) output.Write(sv.Value); return(0); } return(valueFormatter.Format(propertyValue, output, format, _isLiteral)); }
public override void Render(LogEvent logEvent, TextWriter output) { var included = logEvent.Properties .Where(p => !TemplateContainsPropertyName(logEvent.MessageTemplate, p.Key) && !TemplateContainsPropertyName(_outputTemplate, p.Key)) .Select(p => new LogEventProperty(p.Key, p.Value)); var value = new StructureValue(included); _valueFormatter.Format(value, output, null); }