Bug: Only a few levels are printed in pretty mode
Describe the bug
Only a few levels are printed in pretty mode. It's caused by broken _extend function, which ignores depth settings, therefore the hardcoded depth with value 2 is applied.
To Reproduce
Try to log an object with 3+ depth - only 3 levels are pretty printed, the deeper levels are represented with [object Object] string
https://codepen.io/jakubhruby/pen/OJYgzbR?editors=1111
Expected behavior Full depth object is printed.
Screenshots
Here is the code which tries to assign opts (which includes dept: Infinite) to ctx, but it doesn't and ctx remains untouched. Below the default 2 is assigned to ctx.depth which limits output to three levels.
My fix was succesfully merge, but this later commit breaks it again https://github.com/fullstack-build/tslog/commits/v4.9.3/#diff-f37f417161a3f575bc97f812d0cc6c5da9a62f6fe5abbb342b4b2789ecad9ada
Fix is ready...
@terehov fix is ready
Bumping this @terehov :) Having depth set to Infinity, or at least 5 or 10 would be great! Or a simpler way to set it via initialization options
@jakubhruby could you potentially show how to solve this in the mean time using patch? https://bun.sh/docs/install/patch
I gave it a try, but wasn't able to accomplish what you did
@terehov
adjusting the depth option does nothing. Either with null or Infinity, or 10