Skip to content

Commit

Permalink
Render text token through the external method
Browse files Browse the repository at this point in the history
  • Loading branch information
nblumhardt committed Jun 1, 2017
1 parent 8a57c07 commit 5f5770d
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

using System;
using System.Collections.Generic;
using System.IO;
using Serilog.Events;
using Serilog.Parsing;
Expand All @@ -36,8 +35,6 @@ public class MessageTemplateTextFormatter : ITextFormatter
readonly IFormatProvider _formatProvider;
readonly MessageTemplate _outputTemplate;

static readonly IReadOnlyDictionary<string, LogEventPropertyValue> NoProperties = new Dictionary<string, LogEventPropertyValue>();

/// <summary>
/// Construct a <see cref="MessageTemplateTextFormatter"/>.
/// </summary>
Expand Down Expand Up @@ -65,7 +62,7 @@ public void Format(LogEvent logEvent, TextWriter output)
{
if (token is TextToken tt)
{
tt.Render(NoProperties, output, _formatProvider);
MessageTemplateRenderer.RenderTextToken(tt, output);
continue;
}

Expand Down

0 comments on commit 5f5770d

Please sign in to comment.