Skip to content

Commit c3bda22

Browse files
authored
Merge pull request #11112 from mendix/MvM-SetLogLevelsIssue-RUN-4782
Improve information about setting log levels
2 parents 48416ee + ab5f50b commit c3bda22

2 files changed

Lines changed: 41 additions & 4 deletions

File tree

content/en/docs/refguide/runtime/logging/log-levels.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ These are the log levels used by Mendix:
5656
| --- | --- | --- | --- |
5757
| Trace | | | More detailed information. These are only written to logs. |
5858
| Debug | | | Detailed information, typically of interest only when diagnosing problems. |
59-
| Info | | | Confirmation that things are working as expected. |
59+
| Info | | | Confirmation that things are working as expected. |
6060
| Warning | {{< figure src="/attachments/refguide/runtime/log-levels/warning.png" class="no-border" >}} | Orange | Indicates that something unexpected happened or that there is some problem in the near future (for example, "disk space low"). The application is still working as expected. |
6161
| Error | {{< figure src="/attachments/refguide/runtime/log-levels/error.png" class="no-border" >}} | Red | Due to a more serious problem, the application has not been able to perform some function. |
6262
| Critical | {{< figure src="/attachments/refguide/runtime/log-levels/critical.png" class="no-border" >}} | White (text), red (background) | A serious error has occurred, indicating that the application itself may be unable to continue running. |
@@ -69,6 +69,8 @@ In this section you will learn how to specify which log messages are generated,
6969

7070
Log levels can be configured through the runtime admin port before the actual log levels exist. You can therefore create a script that sets all the required log levels at once.
7171

72+
The request is documented in the [Set Log Levels](/refguide/monitoring-mendix-runtime/#log-levels) section of *Monitoring Mendix Runtime*. When making requests to the Mendix runtime, you will need to authenticate by including the authorization headers as described in [Monitoring Mendix Runtime](/refguide/monitoring-mendix-runtime/#auth-headers).
73+
7274
This is a Python script that sets `ConnectionBus` and `ActionManager` to the Trace and Debug levels, respectively:
7375

7476
```py

content/en/docs/refguide/runtime/monitoring-mendix-runtime.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ For deployments to Mendix Cloud, you can get the same information from various p
2222

2323
You can change the admin port from Studio Pro by navigating to **App** > **Settings** > **Configurations** > *your configuration* > **Server** > **Admin port**.
2424

25-
The request needs to be of the **POST** type with **No Authorization** and the following headers:
25+
The following sections explain which monitoring actions are supported.
26+
27+
### Authorization Headers{#auth-headers}
28+
29+
Requests need to be of the **POST** type with **No Authorization** and the following headers:
2630

2731
* Content-Type: **application/json**
2832
* X-M2EE-Authentication: **yourM2EEPassword_Base64Encoded**
@@ -31,8 +35,6 @@ The request needs to be of the **POST** type with **No Authorization** and the f
3135

3236
Remember to Base64 encode the password before passing it as the value for `X-M2EE-Authentication`
3337

34-
The next sections explain which monitoring actions are supported.
35-
3638
## Current Executions
3739

3840
### Request
@@ -673,3 +675,36 @@ This will write logs to standard output in simple text format.
673675
```
674676

675677
This will send logs to the registered OpenTelemetry collector. See [Tracing](/refguide/tracing-in-runtime/) for a guide on how to enable OpenTelemetry.
678+
679+
## Set Log Levels{#log-levels}
680+
681+
This action allows you to programmatically set log levels for specific log nodes without restarting the runtime.
682+
683+
### Request
684+
685+
```json
686+
{
687+
"action": "set_log_level",
688+
"params": {
689+
"subscriber": "*",
690+
"nodes": [
691+
{
692+
"name": "<LogNode>",
693+
"level": "<LogLevel>"
694+
},
695+
696+
],
697+
"force": true
698+
}
699+
}
700+
```
701+
702+
{{% alert color="info" %}}
703+
`LogLevel` can be one of: `TRACE`, `DEBUG`, `INFO`, `WARNING`, `ERROR`, or `CRITICAL`.
704+
705+
The `force` parameter allows you to set log levels for log nodes that do not yet exist in the runtime.
706+
{{% /alert %}}
707+
708+
### Response
709+
710+
The request will always return an empty JSON object (`{}`) with status code 200, if successful.

0 commit comments

Comments
 (0)