Skip to content

Commit 34c0876

Browse files
Document WRANGLER_LOG_PATH system environment variable (#22375)
* Document WRANGLER_LOG_PATH system environment variable I see this option in the changelog and in the source, but not in the docs. * Update src/content/docs/workers/wrangler/system-environment-variables.mdx Co-authored-by: Pete Bacon Darwin <[email protected]> * Update WRANGLER_LOG_PATH language --------- Co-authored-by: Pete Bacon Darwin <[email protected]>
1 parent c1435a9 commit 34c0876

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/content/docs/workers/wrangler/system-environment-variables.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ Wrangler supports the following environment variables:
5959

6060
* Options for Logging levels are `"none"`, `"error"`, `"warn"`, `"info"`, `"log"` and `"debug"`. Levels are case-insensitive and default to `"log"`. If an invalid level is specified, Wrangler will fallback to the default. Logs can include requests to Cloudflare's API, any usage data being collected, and more verbose error logs.
6161

62+
* `WRANGLER_LOG_PATH` <Type text="string" /> <MetaInfo text="optional" />
63+
64+
* A file or directory path where Wrangler will write debug logs. If the path ends in `.log`, Wrangler will consider this the path to a file where all logs will be written. Otherwise, Wrangler will treat the path as a directory where it will write one or more log files using a timestamp for the filenames.
65+
6266
* `FORCE_COLOR` <Type text="string" /> <MetaInfo text="optional" />
6367

6468
* By setting this to `0`, you can disable Wrangler's colorised output, which makes it easier to read with some terminal setups. For example, `FORCE_COLOR=0`.
@@ -78,6 +82,7 @@ CLOUDFLARE_EMAIL=<YOUR_EMAIL>
7882
WRANGLER_SEND_METRICS=true
7983
CLOUDFLARE_API_BASE_URL=https://api.cloudflare.com/client/v4
8084
WRANGLER_LOG=debug
85+
WRANGLER_LOG_PATH=../Desktop/my-logs/my-log-file.log
8186
```
8287

8388
## Deprecated global variables

0 commit comments

Comments
 (0)