az cognitiveservices agent logs
Command group 'cognitiveservices agent' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage hosted agent container logs.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az cognitiveservices agent logs show |
Show logs from a hosted agent container. |
Core | Preview |
az cognitiveservices agent logs show
Command group 'cognitiveservices agent logs' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show logs from a hosted agent container.
Streams console output (stdout/stderr) or system events from an agent container. Use --follow to stream logs in real-time, or omit it to fetch recent logs and exit. This is useful for troubleshooting agent startup issues or monitoring agent behavior.
az cognitiveservices agent logs show --account-name
--agent-version
--name
--project-name
[--follow]
[--tail]
[--type {console, system}]
Examples
Fetch the last 50 lines of console logs from an agent.
az cognitiveservices agent logs show --account-name myAccount --project-name myProject --name myAgent --agent-version 1
Stream console logs in real-time.
az cognitiveservices agent logs show --account-name myAccount --project-name myProject --name myAgent --agent-version 1 --follow
Fetch the last 100 lines of system event logs.
az cognitiveservices agent logs show --account-name myAccount --project-name myProject --name myAgent --agent-version 1 --type system --tail 100
Stream logs with custom tail size.
az cognitiveservices agent logs show --account-name myAccount --project-name myProject --name myAgent --agent-version 1 --follow --tail 200
Required Parameters
Cognitive service account name.
Cognitive Services hosted agent version.
Cognitive Services hosted agent name.
AI project name.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Stream logs in real-time. Without this flag, fetches recent logs and exits.
| Property | Value |
|---|---|
| Default value: | False |
Number of trailing log lines to fetch (1-300). Default: 50.
| Property | Value |
|---|---|
| Default value: | 50 |
Type of logs to stream. 'console' for stdout/stderr, 'system' for container events.
| Property | Value |
|---|---|
| Default value: | console |
| Accepted values: | console, system |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |