שתף באמצעות


az iot du device log

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.46.0 or higher). The extension will automatically install the first time you run an az iot du device log command. Learn more about extensions.

Instance log collection management.

Commands

Name Description Type Status
az iot du device log collect

Configure a device diagnostics log collection operation on specified devices.

Extension GA
az iot du device log list

List instance diagnostic log collection operations.

Extension GA
az iot du device log show

Show a specific instance diagnostic log collection operation.

Extension GA

az iot du device log collect

Experimental Preview Deprecated

Configure a device diagnostics log collection operation on specified devices.

az iot du device log collect --account
                             --agent-id
                             --instance
                             --lcid
                             [--description]
                             [--resource-group]

Examples

Configure diagnostics log collection for two devices d0 and d1.

az iot du device log collect -n {account_name} -i {instance_name} --log-collection-id {log_collection_id} --description "North-wing device diagnostics" --agent-id deviceId=d0 --agent-id deviceId=d1

Configure diagnostics log collection for a module m0 deployed on device d0.

az iot du device log collect -n {account_name} -i {instance_name} --log-collection-id {log_collection_id} --description "ML module diagnostics" --agent-id deviceId=d0 moduleId=m0

Required Parameters

--account -n
Experimental Preview Deprecated

Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}.

--agent-id
Experimental Preview Deprecated

Space-separated key=value pairs corresponding to device update agent identifier properties. The key of deviceId is required, while moduleId is optional. --agent-id can be used 1 or more times.

--instance -i
Experimental Preview Deprecated

Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}.

--lcid --log-collection-id
Experimental Preview Deprecated

Log collection Id.

Optional Parameters

--description
Experimental Preview Deprecated

Description for the log collection operation.

--resource-group -g
Experimental Preview Deprecated

Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

az iot du device log list

Experimental Preview Deprecated

List instance diagnostic log collection operations.

az iot du device log list --account
                          --instance
                          [--resource-group]

Examples

List diagnostic log collection operations.

az iot du device log list -n {account_name} -i {instance_name}

Required Parameters

--account -n
Experimental Preview Deprecated

Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}.

--instance -i
Experimental Preview Deprecated

Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}.

Optional Parameters

--resource-group -g
Experimental Preview Deprecated

Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

az iot du device log show

Experimental Preview Deprecated

Show a specific instance diagnostic log collection operation.

az iot du device log show --account
                          --instance
                          --lcid
                          [--detailed {false, true}]
                          [--resource-group]

Examples

Show a diagnostic log collection operation.

az iot du device log show -n {account_name} -i {instance_name} --log-collection-id {log_collection_id}

Required Parameters

--account -n
Experimental Preview Deprecated

Device Update account name. You can configure the default account name using az config set defaults.adu_account={name}.

--instance -i
Experimental Preview Deprecated

Device Update instance name. You can configure the default instance name using az config set defaults.adu_instance={name}.

--lcid --log-collection-id
Experimental Preview Deprecated

Log collection Id.

Optional Parameters

--detailed
Experimental Preview Deprecated

Flag indicating whether the command should fetch the detailed status of a log collection operation.

Accepted values: false, true
--resource-group -g
Experimental Preview Deprecated

Device Update account resource group name. You can configure the default group using az config set defaults.adu_group={name}.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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