Trying to resolve #129 when using MaxRecursionLimit="2". Better handling of Microsoft-Logger output on LogRequestFinished in AspNetCore.
Also discovered that ExpandoObject-logic doesn't work well with JsonToStringConverter. Now changed JsonToStringConverter to generate output for an json-object so it can be converted into ExpandoObject:
2020-07-09 09:42:56.2691 Error ElasticSearch: Error while formatting property: MethodInfo Exception: System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Dynamic.ExpandoObject'.
at NLog.Targets.ElasticSearch.StringExtensions.ToExpandoObject(String field, JsonSerializer jsonSerializer)
at NLog.Targets.ElasticSearch.ObjectConverter.FormatToExpandoObject(Object value, JsonSerializer jsonSerializer)
Trying to resolve #129 when using
MaxRecursionLimit="2"
. Better handling of Microsoft-Logger output on LogRequestFinished in AspNetCore.Also discovered that
ExpandoObject
-logic doesn't work well withJsonToStringConverter
. Now changedJsonToStringConverter
to generate output for an json-object so it can be converted intoExpandoObject
:Checklist