Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serilog "Maximum destructuring depth reached"

Tags:

serilog

I've enabled SeriLog (latest version) Self-Logging and am seeing hundreds of messages that say

Maximum destructuring depth reached

No idea what that means and whether it's a problem I need to worry about or not.

Does anyone know what triggers this message and whether I'm doing something wrong?

like image 309
Mr. T Avatar asked Aug 25 '16 17:08

Mr. T


1 Answers

From: https://github.com/serilog/serilog/wiki/Structured-Data:

Destructuring is the process of taking a complex .NET object and converting it into a structure, which may later be represented as say, a JSON object or XML blob

Sounds like you might have a ciruclar reference in some data you're logging so when Serilog tries to destructure it, it's running into a recursive loop. Sounds like it has some code to detect this and stop the infinite recursion. I suspect that's where this warning is coming from.

like image 130
PatrickSteele Avatar answered Oct 23 '22 04:10

PatrickSteele