Skip to content

Commit ee48bd9

Browse files
Merge pull request #274637 from jiec-msft/mason/asa-oss-config-server-log-streaming
Add description for OSS Config Server log streaming
2 parents 227651c + 1cc6afd commit ee48bd9

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

articles/spring-apps/enterprise/how-to-managed-component-log-streaming.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For streaming logs of applications in Azure Spring Apps, see [Stream Azure Sprin
2222

2323
## Prerequisites
2424

25-
- [Azure CLI](/cli/azure/install-azure-cli) with the Azure Spring Apps extension, version 1.19.0 or higher. You can install the extension by using the following command: `az extension add --name spring`.
25+
- [Azure CLI](/cli/azure/install-azure-cli) with the Azure Spring Apps extension, version 1.24.0 or higher. You can install the extension by using the following command: `az extension add --name spring`.
2626

2727
## Supported managed components
2828

@@ -32,6 +32,7 @@ The following table lists the managed components that are currently supported, a
3232
|-----------------------------------|----------------------------------------------------------------------------------------------------|
3333
| Application Configuration Service | `application-configuration-service` <br/> `flux-source-controller` (Supported in ACS Gen2 version) |
3434
| Spring Cloud Gateway | `spring-cloud-gateway` <br/> `spring-cloud-gateway-operator` |
35+
| Spring Cloud Config Server | `config-server` |
3536

3637
You can use the following command to list all subcomponents:
3738

@@ -49,6 +50,7 @@ To stream logs of managed components, you must have the relevant Azure roles ass
4950
|-----------------------------------|---------------------------------------------------------------------|---------------------------------------------------------------------------------|
5051
| Application Configuration Service | Azure Spring Apps Application Configuration Service Log Reader Role | `Microsoft.AppPlatform/Spring/ApplicationConfigurationService/logstream/action` |
5152
| Spring Cloud Gateway | Azure Spring Apps Spring Cloud Gateway Log Reader Role | `Microsoft.AppPlatform/Spring/SpringCloudGateway/logstream/action` |
53+
| Spring Cloud Config Server | Azure Spring Apps Spring Cloud Config Server Log Reader Role | `Microsoft.AppPlatform/Spring/configService/logstream/action` |
5254

5355
### [Azure portal](#tab/azure-Portal)
5456

@@ -220,6 +222,27 @@ The command returns logs similar to the following example:
220222
...
221223
```
222224

225+
#### View tail logs for an instance of config-server
226+
227+
Use the following command to view the tail logs for `config-server`:
228+
229+
```azurecli
230+
az spring component logs \
231+
--resource-group <resource-group-name> \
232+
--service <Azure-Spring-Apps-instance-name> \
233+
--name config-server \
234+
--instance <instance-name>
235+
```
236+
237+
The command returns logs similar to the following example:
238+
239+
```output
240+
...
241+
{"app":"config-server","ts":"2024-05-08T05:38:29.44Z","logger":"org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext","level":"INFO","class":"org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext","method":"prepareWebApplicationContext","file":"ServletWebServerApplicationContext.java","line":291,"thread":"main","message":"Root WebApplicationContext: initialization completed in 3771 ms"}
242+
{"app":"config-server","ts":"2024-05-08T05:38:31.058Z","logger":"com.microsoft.azure.spring.service.CloudConfigServerApplication","level":"INFO","class":"org.springframework.boot.StartupInfoLogger","method":"logStarted","file":"StartupInfoLogger.java","line":57,"thread":"main","message":"Started CloudConfigServerApplication in 6.888 seconds (process running for 8.986)"}
243+
...
244+
```
245+
223246
---
224247

225248
### View tail logs for all instances in one command

0 commit comments

Comments
 (0)