You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/hosting/cht/docker/logs.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,19 +26,25 @@ CHT has the following services running via Docker and each can have its logs que
26
26
27
27
## Setting log level
28
28
29
-
To control log verbosity, set the `LOG_LEVEL` environment variable before starting the containers. The default value is `info`.
29
+
To control log verbosity, set the `LOG_LEVEL` environment variable for the`api` and `sentinel` containers. The default value is `info`.
30
30
31
31
{{< callout type="info" >}}
32
32
From version 5.1.0 onward, use `LOG_LEVEL` to control log verbosity. The `NODE_ENV` value no longer affects logging detail.
33
33
{{< /callout >}}
34
34
35
35
### Configuration
36
36
37
-
**Example usage:**
37
+
Add `LOG_LEVEL` to the `.env` file used by your Docker Compose deployment:
38
+
39
+
```
40
+
LOG_LEVEL=debug
41
+
```
42
+
43
+
Then start or recreate the containers:
38
44
```bash
39
-
export LOG_LEVEL=debug
40
45
docker compose up -d
41
46
```
47
+
42
48
**Supported values:**
43
49
44
50
-`error` — Only error messages (production use)
@@ -52,12 +58,15 @@ Using `debug` level generates significantly more logs and may impact performance
52
58
53
59
### Applying changes to running containers
54
60
55
-
To change the log level for already running containers, update the environment variable and restart:
61
+
To change the log level for already running containers, update the `LOG_LEVEL` value in your `.env` file and recreate the containers:
56
62
```bash
57
-
export LOG_LEVEL=warn
58
-
docker compose restart
63
+
docker compose up -d
59
64
```
60
65
66
+
{{< callout type="info" >}}
67
+
`docker compose restart` does not pick up environment variable changes. Use `docker compose up -d` to recreate the containers with the new configuration.
68
+
{{< /callout >}}
69
+
61
70
## Viewing logs
62
71
63
72
First, find the actual names of the containers with the `docker ps --format '{{.Names}}'` command which should show something like this:
0 commit comments