private JValue CleanseValue(JValue value) { var text = value.Value <string>(); var cleansed = CleanseLogMessage.Cleanse(text); return(new JValue(cleansed)); }
public override void Visit(JArray json) { for (var i = 0; i < json.Count; i++) { if (json[i].Type == JTokenType.String) { var text = json[i].Value <string>(); json[i] = new JValue(CleanseLogMessage.Cleanse(text)); } } foreach (JToken token in json) { Visit(token); } }
protected override string GetFormattedMessage(LogEventInfo logEvent) { return(CleanseLogMessage.Cleanse(Layout.Render(logEvent))); }