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
Copy file name to clipboardExpand all lines: articles/spring-cloud/spring-cloud-howto-log-streaming.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,9 @@ Azure Spring Cloud enables log streaming in Azure CLI to get real-time applicati
16
16
* Install [Azure CLI extension](https://docs.microsoft.com/azure/spring-cloud/spring-cloud-quickstart-launch-app-cli#install-the-azure-cli-extension) for Spring Cloud, minimum version 0.2.0 .
17
17
* An instance of **Azure Spring Cloud** with a running application, for example [Spring Cloud app](./spring-cloud-quickstart-launch-app-cli.md).
18
18
19
+
> [!NOTE]
20
+
> The ASC CLI extension is updated from version 0.2.0 to 0.2.1. This change affects the syntax of the command for log streaming: `az spring-cloud app log tail`, which is replaced by: `az spring-cloud app logs`. The command: `az spring-cloud app log tail` will be deprecated in a future release. If you have been using version 0.2.0, you can upgrade to 0.2.1. First, remove the old version with the command: `az extension remove -n spring-cloud`. Then, install 0.2.1 by the command: `az extension add -n spring-cloud`.
21
+
19
22
## Use CLI to tail logs
20
23
21
24
To avoid repeatedly specifying your resource group and service instance name, set your default resource group name and cluster name.
@@ -28,7 +31,7 @@ In following examples, the resource group and service name will be omitted in th
28
31
### Tail log for app with single instance
29
32
If an app named auth-service has only one instance, you can view the log of the app instance with the following command:
30
33
```
31
-
az spring-cloud app log tail -n auth-service
34
+
az spring-cloud app logs -n auth-service
32
35
```
33
36
This will return logs:
34
37
```
@@ -61,7 +64,7 @@ auth-service-default-12-75cc4577fc-n25mh Running UP
61
64
Then, you can stream logs of an app instance with the option `-i/--instance` option:
62
65
63
66
```
64
-
az spring-cloud app log tail -n auth-service -i auth-service-default-12-75cc4577fc-pw7hb
67
+
az spring-cloud app logs -n auth-service -i auth-service-default-12-75cc4577fc-pw7hb
65
68
```
66
69
67
70
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**.
@@ -70,11 +73,11 @@ You can also get details of app instances from the Azure portal. After selectin
70
73
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