Κοινή χρήση μέσω


az containerapp job logs

Note

This reference is part of the containerapp extension for the Azure CLI (version 2.62.0 or higher). The extension will automatically install the first time you run an az containerapp job logs command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show container app job logs.

Commands

Name Description Type Status
az containerapp job logs show

Show past logs and/or print logs in real time (with the --follow parameter). Note that the logs are only taken from one execution, replica, and container.

Extension Preview

az containerapp job logs show

Preview

Command group 'containerapp job logs' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show past logs and/or print logs in real time (with the --follow parameter). Note that the logs are only taken from one execution, replica, and container.

az containerapp job logs show --container
                              --name
                              --resource-group
                              [--execution]
                              [--follow {false, true}]
                              [--format {json, text}]
                              [--replica]
                              [--tail]

Examples

Fetch the past 20 lines of logs from a job and return

az containerapp job logs show -n my-containerappjob -g MyResourceGroup --container MyContainer

Fetch 30 lines of past logs logs from a job and print logs as they come in

az containerapp job logs show -n my-containerappjob -g MyResourceGroup --container MyContainer --follow --tail 30

Fetch logs for a particular execution, replica, and container

az containerapp job logs show -n my-containerappjob -g MyResourceGroup --execution MyExecution --replica MyReplica --container MyContainer

Required Parameters

--container

The name of the container.

--name -n

The name of the Containerapp job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<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.

--execution

The name of the container app execution. Defaults to the latest execution.

--follow

Print logs in real time if present.

Property Value
Default value: False
Accepted values: false, true
--format

Log output format.

Property Value
Default value: json
Accepted values: json, text
--replica

The name of the replica. List replicas with 'az containerapp job replica list'. A replica may not exist if the job pod has been cleaned up.

--tail

The number of past logs to print (0-300).

Property Value
Default value: 20
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False