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
title: Use dynamic logger level settings for troubleshooting Java applications in Azure Container Apps (preview)
3
-
description: Learn how to leverage dynamic logger level settings to debug your Java applications running on Azure Container Apps.
3
+
description: Learn how to use dynamic logger level settings to debug your Java applications running on Azure Container Apps.
4
4
services: container-apps
5
5
author: craigshoemaker
6
6
ms.service: container-apps
7
-
ms.custom: devx-track-azurecli
8
7
ms.topic: how-to
9
-
ms.date: 03/13/2024
8
+
ms.date: 05/10/2024
10
9
ms.author: cshoe
11
10
---
12
11
13
12
# Use dynamic logger level settings for troubleshooting Java applications in Azure Container Apps (preview)
14
13
15
-
Azure Container Apps platform offers a built-in diagnostics tool exclusively for Java developers to help them debug and troubleshoot their Java applications running on Azure Container Apps more easily and effeiciently. One of the key functionalities provided is dynamic logger level change, which allows developers to get more hidden information from app logs without modifying code and restarting apps.
14
+
Azure Container Apps platform offers a built-in diagnostics tool exclusively for Java developers to help them debug and troubleshoot their Java applications running on Azure Container Apps more easily and efficiently. One of the key features is a dynamic logger level change, which allows you to get more hidden information from app logs without modifying code and restarting apps.
16
15
17
16
## Enable JVM diagnostics for your Java applications
18
17
19
-
Before using the Java diagnostics tool, you need to enable JVM diagnostics for your Azure Container Apps first. This step will unblock Java diagnostics functionalities by injecting an advanced diagnostics agent into your app and may restart it.
18
+
Before using the Java diagnostics tool, you need to first enable Java Virtual Machine (JVM) diagnostics for your Azure Container Apps. This step enables Java diagnostics functionality by injecting an advanced diagnostics agent into your app. Your app might restart during this process.
20
19
21
-
Create a new Azure Container Apps with JVM diagnostics enabled:
20
+
To take advantage of these diagnostic tools, you can create a new container app with them enabled, or update an existing container app.
21
+
22
+
To create a new container app with JVM diagnostics enabled, use the following command:
Update an existing Azure Container Apps to enable JVM diagnostics:
32
+
To update an existing container app, use the following command:
32
33
33
34
```azurecli
34
35
// TODO: replace this
@@ -40,7 +41,9 @@ az containerapp create --enable-java-agent \
40
41
41
42
## Change runtime logger levels
42
43
43
-
After enabling JVM diagnostics, you can change runtime logger levels without interruptting your running apps now.
44
+
After enabling JVM diagnostics, you can change runtime logger levels without interrupting your running apps.
45
+
46
+
Use the following command to adjust the logger levels in your Java application.
44
47
45
48
```azurecli
46
49
// TODO: replace this
@@ -49,32 +52,41 @@ az containerapp env java-component list \
49
52
--resource-group <RESOURCE_GROUP>
50
53
```
51
54
52
-
It may take up to 2 minutes for the logger level change to take effect. You can then check out your app logs from [Log streaming](log-streaming.md) or other [Log options](log-options.md).
55
+
It could take up to two minutes for the logger level change to take effect. Once complete, you can check the application logs from [log streams](log-streaming.md) or other [log options](log-options.md).
53
56
54
57
## Supported Java logging frameworks
55
58
56
-
Currently most of those popular Java logging frameworks are supported: [Log4j2](https://logging.apache.org/log4j/2.x/), [SLF4J](https://slf4j.org/), [jboss-logging](https://github.com/jboss-logging/jboss-logging). For Log4j, only version 2.* is supported.
59
+
The following Java logging frameworks are supported:
60
+
61
+
-[Log4j2](https://logging.apache.org/log4j/2.x/) (only version 2.*)
### Supported log levels by different logging frameworks
59
66
60
-
Different logging frameworks have different log levels supported. In JVM diagnostics platform, some of them are supported as well but others are not yet. If you are using a specific logging framework and you want to use dynamic log level change, you need to make sure those log levels you are using are supported by both framework and platform.
67
+
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.
0 commit comments