Where is the wrangler.toml file ?
To keep Logs enabled on my Worker, it seems I need to do what's on the screenshot. That's all well and good, but where is that file ? I only have a worker.js file in the edit UI.
11 Replies
Hey @TheCarpetMerchant , if you're editing a worker in the UI, you can enable observability by going into the "Logs" tab and clicking the blue "Enable" button in the table below.
Yes, but everytime you deploy that gets reset.
Hence why the UI helpfully provides a solution, but unfortunately doesn't tell you where to apply it
It shouldn't reset if you deploy using Quick Edit
it'd only reset if you deploy with Wrangler in which case you will have a
wrangler.toml
file
if it is resetting during a Quick Edit deploy that's a bugBy Quick Edit, do you mean this ?
Because if so yes, it does get reset when going there, making a change and hitting "deploy"
But in any case I'd rather know where to put this wrangler file ?
I'm not sure what that icon is, I mean the Edit Code here in the dashboard
where is that screenshot from?
In the root but if you're using quick edit that won't work (since it isn't wrangler)
This documentation never talks about the file's location, nor does it provide an example repo
Cloudflare Docs
Configuration - Wrangler · Cloudflare Workers docs
Use a configuration file to customize the development and deployment setup for your Worker project and other Developer Platform products.
https://dash.cloudflare.com/hash/workers/services/view/my-worker-name/production
What's weird is that I had it like you before, and then it changed to just the icon. Not great UI
I've never seen it with just the icon 🤔
Regardless, sounds like there's a bug
If you want to use Wrangler, you need to install Wrangler and create a
wrangler.toml
in the root like this:
I’ve had to add a task to my cron Worker to reenable Observability every minute on all my Workers, because it gets disabled every time you deploy from Dashboard.
I’ve had the QuickEdit icon changed over the weekend as well.