Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum depth of objects destructuring should be controllable #227

Closed
konste opened this issue Sep 25, 2014 · 3 comments
Closed

Maximum depth of objects destructuring should be controllable #227

konste opened this issue Sep 25, 2014 · 3 comments

Comments

@konste
Copy link

konste commented Sep 25, 2014

At this time maximum depth of objects destructuring is a constant 10, I believe. In most cases it is too much, simply because it is practically unusable to refer to something from that deep in log queries.

It would help if this value ("MaxDestructureDepth") become optional parameter. Please consider it.

Thank you!
Konstantin

@nblumhardt
Copy link
Member

I've found with a depth of 10 links recursive graphs also get very large - it does seem like 10's the wrong default.

I'll give some thought as to how to tackle this in a way that lets logging code, rather than configuration code, control the depth.

Thanks!

@nblumhardt
Copy link
Member

Default is now 5.

To increase:

var log = new LoggerConfiguration()
  .Destructure.ToMaximumDepth(100)
  .CreateLogger();

@konste
Copy link
Author

konste commented Nov 16, 2014

Very good! Thank you!

< sent from mobile device >

On Nov 15, 2014, at 5:04 PM, Nicholas Blumhardt <notifications@github.commailto:notifications@github.com> wrote:

Default is now 5.

To increase:

var log = new LoggerConfiguration()
.Destructure.ToMaximumDepth(100)
.CreateLogger();

Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-63199817.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants