-
Notifications
You must be signed in to change notification settings - Fork 688
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
🐛 BUG: Regression with console.log-ing objects #3591
Comments
@mrbbot Is this related to how Miniflare handles logging with WorkerD? |
Is there any updates on this issue? Its been months since any updates have been given and its still a major issue when developing locally with Wrangler. |
@Cherry thanks for filing this issue. This is definitely something we need to fix. We're going to pick this up shortly and hopefully have a resolution sometime in the next couple of weeks. |
cloudflare/workerd#1294 has now been merged, so this should be fixed in next week's Wrangler release 👍 |
EDIT: My initial comment here was looking at the wrong thing, sorry! This appears to be resolved now with 3.15.0, going to mark this as resolved! 🥳Thank you for the fix! |
Which Cloudflare product(s) does this pertain to?
Wrangler
What version of
Wrangler
are you using?3.2.0
What operating system are you using?
Windows
Describe the Bug
Deep objects are no longer logged as previously. While not the best method of debugging, logging objects is still very useful for quick debug.
Basic Example
With the following script as
worker.ts
:wrangler 2
npx wrangler@2.20.0 dev --local worker.ts
wrangler 3
npx wrangler@3.2.0 dev worker.ts
Deeper example
In Node.js, object properties do begin to get truncated when logging deep objects, such as with this script:
wrangler 2 output:
wrangler 3 output:
In node.js, the common way to solve this is using
console.dir(..., {depth: null})
, so when updating the script to the following:wrangler 2 output:
wrangler 3 output:
The text was updated successfully, but these errors were encountered: