Skip to content

Commit b215464

Browse files
committed
docs(medic#10357): fix LOG_LEVEL documentation for Docker deployments
1 parent 45faafb commit b215464

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

  • content/en/hosting/cht/docker

content/en/hosting/cht/docker/logs.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,25 @@ CHT has the following services running via Docker and each can have its logs que
2626

2727
## Setting log level
2828

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`.
3030

3131
{{< callout type="info" >}}
3232
From version 5.1.0 onward, use `LOG_LEVEL` to control log verbosity. The `NODE_ENV` value no longer affects logging detail.
3333
{{< /callout >}}
3434

3535
### Configuration
3636

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:
3844
```bash
39-
export LOG_LEVEL=debug
4045
docker compose up -d
4146
```
47+
4248
**Supported values:**
4349

4450
- `error` — Only error messages (production use)
@@ -52,12 +58,15 @@ Using `debug` level generates significantly more logs and may impact performance
5258

5359
### Applying changes to running containers
5460

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:
5662
```bash
57-
export LOG_LEVEL=warn
58-
docker compose restart
63+
docker compose up -d
5964
```
6065

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+
6170
## Viewing logs
6271

6372
First, find the actual names of the containers with the `docker ps --format '{{.Names}}'` command which should show something like this:

0 commit comments

Comments
 (0)