Skip to content

Commit cd6368e

Browse files
authored
Merge pull request #101521 from MikeDodaro/logStreaming4
Improvements to log streaming doc
2 parents 028c2e3 + 10cdb7b commit cd6368e

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

articles/spring-cloud/spring-cloud-howto-log-streaming.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,29 @@ This will return logs:
4242
```
4343

4444
### Tail log for app with multiple instances
45-
If multiple instances exist for the app named `auth-service`, you can view the instance log by using the `-i/--instance` option. For example, you can stream the log of an instance of one app by specifying the app name and instance name:
45+
If multiple instances exist for the app named `auth-service`, you can view the instance log by using the `-i/--instance` option.
46+
47+
First, you can get the app instance names with following command.
48+
49+
```
50+
az spring-cloud app show -n auth-service --query properties.activeDeployment.properties.instances -o table
51+
```
52+
With results:
53+
54+
```
55+
Name Status DiscoveryStatus
56+
------------------------------------------- -------- -----------------
57+
auth-service-default-12-75cc4577fc-pw7hb Running UP
58+
auth-service-default-12-75cc4577fc-8nt4m Running UP
59+
auth-service-default-12-75cc4577fc-n25mh Running UP
60+
```
61+
Then, you can stream logs of an app instance with the option `-i/--instance` option:
4662

4763
```
4864
az spring-cloud app log tail -n auth-service -i auth-service-default-12-75cc4577fc-pw7hb
4965
```
50-
You can also get the app instances from the Azure portal.
51-
1. Navigate to your resource group and select your Azure Spring Cloud instance.
52-
1. From the Azure Spring Cloud instance overview select **Apps** in the left navigation pane.
53-
1. Select your app, and then click **App Instances** in the left navigation pane.
54-
1. App instances will be displayed.
66+
67+
You can also get details of app instances from the Azure portal. After selecting **Apps** in the left navigation pane of your Azure Spring Cloud service, select **App Instances**.
5568

5669
### Continuously stream new logs
5770
By default, `az spring-cloud ap log tail` prints only existing logs streamed to the app console and then exits. If you want to stream new logs, add -f (--follow):

0 commit comments

Comments
 (0)