Skip to content

Commit 0a8f7f6

Browse files
authored
Merge pull request #104892 from MikeDodaro/loggingUpdate
Update to az spring-cloud app logs command.
2 parents f82aea2 + 8920926 commit 0a8f7f6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ Azure Spring Cloud enables log streaming in Azure CLI to get real-time applicati
1616
* 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 .
1717
* An instance of **Azure Spring Cloud** with a running application, for example [Spring Cloud app](./spring-cloud-quickstart-launch-app-cli.md).
1818

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+
1922
## Use CLI to tail logs
2023

2124
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
2831
### Tail log for app with single instance
2932
If an app named auth-service has only one instance, you can view the log of the app instance with the following command:
3033
```
31-
az spring-cloud app log tail -n auth-service
34+
az spring-cloud app logs -n auth-service
3235
```
3336
This will return logs:
3437
```
@@ -61,7 +64,7 @@ auth-service-default-12-75cc4577fc-n25mh Running UP
6164
Then, you can stream logs of an app instance with the option `-i/--instance` option:
6265

6366
```
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
6568
```
6669

6770
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
7073
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):
7174

7275
```
73-
az spring-cloud app log tail -n auth-service -f
76+
az spring-cloud app logs -n auth-service -f
7477
```
7578
To check all the logging options supported:
7679
```
77-
az spring-cloud app log tail -h
80+
az spring-cloud app logs -h
7881
```
7982

8083
## Next steps

0 commit comments

Comments
 (0)