Skip to content

Commit c2130de

Browse files
authored
Update java-dynamic-log-level.md
1 parent c29bd7b commit c2130de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/container-apps/java-dynamic-log-level.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ To update an existing container app, use the following command:
3737

3838
```azurecli
3939
az containerapp update --enable-java-agent \
40-
--environment <ENVIRONMENT_NAME> \
4140
--resource-group <RESOURCE_GROUP> \
4241
--name <CONTAINER_APP_NAME>
4342
```
@@ -54,7 +53,6 @@ Use the following command to adjust log levels for a specific logger:
5453
az containerapp java logger set \
5554
--logger-name "org.springframework.boot" \
5655
--logger-level "info"
57-
--environment <ENVIRONMENT_NAME> \
5856
--resource-group <RESOURCE_GROUP> \
5957
--name <CONTAINER_APP_NAME>
6058
```
@@ -66,23 +64,23 @@ It may take up to two minutes for the logger level change to take effect. Once c
6664
The following Java logging frameworks are supported:
6765

6866
- [Log4j2](https://logging.apache.org/log4j/2.x/) (only version 2.*)
69-
- [SLF4J](https://slf4j.org/)
67+
- [Logback](https://logback.qos.ch/)
7068
- [jboss-logging](https://github.com/jboss-logging/jboss-logging)
7169

7270
### Supported log levels by different logging frameworks
7371

7472
Different logging frameworks support different log levels. In the JVM diagnostics platform, some frameworks are better supported than others. Before changing logging levels, make sure the log levels you're using are supported by both the framework and platform.
7573

76-
| Framework | Off | Fatal | Error | Warn | Info | Debug | Trace | All |
74+
| Framework | OFF | FATAL | ERROR | WARN | INFO | DEBUG | TRACE | ALL |
7775
|---------------|-------|-------|-------|------|------|-------|-------|-----|
7876
| Log4j2 | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
79-
| SLF4J | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
77+
| Logback | Yes | No | Yes | Yes | Yes | Yes | Yes | Yes |
8078
| jboss-logging | No | Yes | Yes | Yes | Yes | Yes | Yes | No |
8179
| **Platform** | Yes | No | Yes | Yes | Yes | Yes | Yes | No |
8280

8381
### General visibility of log levels
8482

85-
| Log Level | Fatal | Error | Warn | Info | Debug | Trace | All |
83+
| Log Level | FATAL | ERROR | WARN | INFO | DEBUG | TRACE | ALL |
8684
|-----------|-------|-------|------|------|-------|-------|-----|
8785
| **OFF** | | | | | | | |
8886
| **FATAL** | Yes | | | | | | |
@@ -93,6 +91,8 @@ Different logging frameworks support different log levels. In the JVM diagnostic
9391
| **TRACE** | Yes | Yes | Yes | Yes | Yes | Yes | |
9492
| **ALL** | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
9593

94+
For example, if you set log level to `DEBUG`, your app will print logs with level `FATAL`, `ERROR`, `WARN`, `INFO`, `DEBUG` and will NOT print logs with level `TRACE` AND `ALL`.
95+
9696
## Related content
9797

9898
> [!div class="nextstepaction"]

0 commit comments

Comments
 (0)