#5515 Logs not written to filesystem as printed
Cannot reproduce on wrangler 4.60.0. Log files are now created correctly at ~/.wrangler/logs/. Issue reported against v3.47.0 - log path and handling changed significantly since then.
Ask reporter to verify if still occurring on latest wrangler version
Analysis Report
Issue Review: cloudflare/workers-sdk#5515
Summary
Error messages claim logs were written to a file path, but the file was not actually created on the filesystem.
Findings
- Created: 2024-04-04
- Updated: 2025-10-30
- Version: 3.47.0 -> 4.60.0 (major version upgrade since report)
- Component: Wrangler
- Labels: bug, quick win, error-messaging
- Comments: 0
Key Evidence
Reproduction attempt on v4.60.0: The bug does NOT reproduce. Running
npx wrangler pages deploy --debugnow:- Displays the error message about the unknown argument
- Shows the log file path (
~/.wrangler/logs/wrangler-<timestamp>.log) - The log file IS actually created and contains debug information
Path difference: The original issue mentioned logs at
/Users/[username]/Library/Preferences/.wrangler/logs/, but current wrangler uses~/.wrangler/logs/. This suggests the underlying log file handling has been significantly refactored.Related PRs found:
- PR #4341 (merged 2023-11-20): "Intercept workerd logs + write all debug logs to a hidden file" - implemented the log file writing feature
- PR #4488 (merged 2023-11-22): "Log file fixes" - changed the default directory and ensured log files are only mentioned when they contain errors
No fix explicitly mentioning #5515: While no PR directly references this issue, the log writing behavior has been improved and the path has changed since the issue was reported.
Version gap: The issue was reported against v3.47.0. Current version is v4.60.0, representing over a year of development and many bug fixes.
Recommendation
Status: NEEDS VERIFICATION
Reasoning: The reproduction attempt shows the bug does not occur with the current version of Wrangler (v4.60.0). The log file is properly created when error messages indicate it should be. However, since no PR explicitly fixed this issue, it's possible the fix was a side effect of other changes, and we should confirm with the reporter.
Action: Post a comment asking the reporter to verify if the issue still occurs with the latest version of Wrangler.
Suggested Comment
Hi @simonhaenisch! This issue was reported against Wrangler v3.47.0, and we're now on v4.60.0 with significant changes to log file handling.
I attempted to reproduce this issue with the latest version using the exact steps provided (
npx wrangler pages deploy --debug), and the log file is now being created correctly at~/.wrangler/logs/wrangler-<timestamp>.log.Could you please verify if this issue still occurs for you with the latest version of Wrangler? If the issue is resolved, we can close this ticket.
Thanks!
Notes & Feedback (0)
No notes yet.