Skip to content

Commit 5639d5d

Browse files
committed
update existing logs page
1 parent 4a90a99 commit 5639d5d

File tree

2 files changed

+15
-31
lines changed

2 files changed

+15
-31
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-run-parameters.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ By default, `cloudflared` will periodically check for updates and restart with t
2222

2323
:::note
2424

25-
For locally-managed tunnels only.
25+
For locally-managed tunnels only.
2626
:::
2727

2828
| Syntax | Default |
@@ -75,7 +75,7 @@ Saves application log to this file. Mainly useful for reporting issues. For more
7575
| ---------------------------------------------------------- | ------- | -------------------- |
7676
| `cloudflared tunnel --loglevel <VALUE> run <UUID or NAME>` | `info` | `TUNNEL_LOGLEVEL` |
7777

78-
Specifies the verbosity of logging. The default `info` level does not produce much output, but you may wish to use the `warn` level in production. Available values are: `debug`, `info`, `warn`, `error`, `fatal`.
78+
Specifies the verbosity of logging for the local `cloudflared` instance. Available values are `debug`, `info` (default), `warn`, `error`, and `fatal`. At the `debug` level, `cloudflared` will log and display the request URL, method, protocol, content length, as well as all request and response headers. However, note that this can expose sensitive information in your logs.
7979

8080
## `metrics`
8181

@@ -97,7 +97,7 @@ Disables automatic `cloudflared` updates. See also: [`autoupdate-freq`](#autoupd
9797

9898
:::note
9999

100-
For locally-managed tunnels only.
100+
For locally-managed tunnels only.
101101
:::
102102

103103
| Syntax | Default | Environment Variable |
@@ -152,7 +152,7 @@ Specifies custom tags used to identify this tunnel. Multiple tags may be specifi
152152

153153
:::note
154154

155-
For remotely-managed tunnels only.
155+
For remotely-managed tunnels only.
156156
:::
157157

158158
| Syntax | Environment Variable |

src/content/docs/cloudflare-one/connections/connect-networks/monitor-tunnels/logs.mdx

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,42 @@
11
---
22
pcx_content_type: reference
3-
title: Logs
3+
title: Log streaming
44
sidebar:
55
order: 1
66
head:
77
- tag: title
8-
content: Tunnel logs
8+
content: Tunnel log streams
99
---
1010

1111
Tunnel logs record all activity between a `cloudflared` instance and Cloudflare's global network, as well as all activity between `cloudflared` and your origin server. These logs allow you to investigate connectivity or performance issues with a Cloudflare Tunnel. You can configure your server to store persistent logs, or you can stream real-time logs from any client machine.
1212

1313
## View logs on the server
1414

15-
If you have access to the origin server, you can enable logging when you start the tunnel:
15+
If you have access to the origin server, you can use the [`--loglevel` flag](/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-run-parameters/#loglevel) to enable logging when you start the tunnel. By default, `cloudflared` prints logs to stdout and does not store logs on the server. You can optionally use the [`--logfile` flag](/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-run-parameters/#logfile) to write your logs to a file.
1616

17-
```sh
18-
cloudflared tunnel --loglevel debug run <UUID>
19-
```
20-
21-
The [`--loglevel` flag](/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-run-parameters/#loglevel) indicates the logging level for the local `cloudflared` instance, which can be one of {`debug`, `info`, `warn`, `error`, `fatal`} (default: `info`). At the `debug` level, `cloudflared` will log and display the request URL, method, protocol, content length, as well as all request and response headers. However, note that this can expose sensitive information in your logs.
22-
23-
### Write logs to file
24-
25-
By default, `cloudflared` prints logs to stdout and does not store logs on the server. You can use the [`--logfile` flag](/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-run-parameters/#logfile) to save your logs to a file:
17+
To enable logs for a locally-managed tunnel:
2618

2719
```sh
28-
cloudflared tunnel --logfile mytunnel.log run <UUID>
20+
cloudflared tunnel --loglevel debug --logfile cloudflared.log run <UUID>
2921
```
3022

23+
To enable logs for a remotely-managed tunnel, add `--loglevel debug` and `--logfile <PATH>` to your system service as shown in [Add tunnel run parameters](/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management/#add-tunnel-run-parameters).
24+
3125
## View logs on your local machine
3226

33-
You can view real-time logs for a Cloudflare Tunnel via the dashboard or from any machine that has `cloudflared` installed. With remote log streams, you do not need to SSH into the server that is running the tunnel.
27+
You can view real-time logs for a Cloudflare Tunnel via the dashboard or from any machine that has `cloudflared` installed. With remote log streams, you do not need to SSH into the server that is running the tunnel. To get remote logs, the tunnel must be active and able to receive requests.
3428

3529
### Dashboard
3630

37-
#### Prerequisites
31+
Dashboard log streams are only available for remotely-managed tunnels. To view logs from the dashboard:
3832

39-
- `cloudflared` version 2023.5.1 or higher is installed on the origin server.
40-
- The tunnel is active and able to receive requests.
41-
42-
#### View logs
43-
44-
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels** and select your tunnel.
33+
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels** and select a remotely-managed tunnel.
4534
2. In the sidebar, select the **Connector ID** for the `cloudflared` instance you want to view.
4635
3. Select **Begin log stream**.
4736

4837
### CLI
4938

50-
The `cloudflared` daemon can stream logs from any tunnel in your account to the local command line.
51-
52-
#### Prerequisites
53-
54-
- `cloudflared` version 2023.5.1 or higher is installed on both your local machine and the origin server.
55-
- The tunnel is active and able to receive requests.
39+
The `cloudflared` daemon can stream logs from any tunnel in your account to the local command line. `cloudflared` must be installed on both your local machine and the origin server.
5640

5741
#### View logs
5842

0 commit comments

Comments
 (0)