Monday, January 29, 2018


Last week a collegae mentionted he had some problems with Serilog, a structured logging library for .NET. Most of the time it just worked fine, but he noticed that in some situations no log messages were written to a sink. We first thought it had something to do with misconfigured log levels but that turned out to be a wrong assumption.

In the end, we found the root cause after enabling the Serilog debug log:

After doing that, we discovered that in some cases the following message was logged:

Maximum destructuring depth reached.

Due to a recursive object in one of our log messages, the JSON serializer gives up and Serilog discards the message.

1 comment:

viji malar said...

This is so informative blog and i have used this 5 minutes thing very useful too happy with this blog........

MSBI Training in Chennai
Base SAS Training in Chennai
Hadoop Training in Chennai