Logs to Azure

This Support Application feature enables sending log files to Azure Cloud storage.

Overview

The Support Application provides a method of sending log files to Azure Cloud storage. To utilize the Logs to Azure feature, an Azure Connection String and storage Container will need to be created within the Azure Storage Accounts.

User Guide

  1. To enable the Sending Log Files to Azure feature, you need to configure the following basic values:

  • submitLogs - Define the Log files to upload

  • loggingConnection - The Azure Connection string within Azure Storage Accounts

  • loggingContainer - The Azure Blob Storage container name

  1. Once the feature is enabled, the Support Application will start sending log files to Azure. The log files will be stored in Azure in a format that can be easily accessed and analyzed.

Feature Configuration

To set up Logs to Azure for a particular device profile or device group, please follow the steps below:

Setting Up The Logging Connection

Specify the connection string to authenticate and connect to the Azure storage account.

"loggingConnection" : "DefaultEndpointsProtocol=https;AccountName=blah;AccountKey=blah==;EndpointSuffix=core.windows.net"

Defining the Container Name

Specify the container name within the storage account where logs will be stored.

 "loggingContainer" : "a-container-name"

Enabling Log Submissions

If the enabled property of submitLogs is set to true, logs will be submitted to the configured destination.

 "submitLogs": {
         "enabled" :  true

Disabling the Alarm

If the alarmEnabled property of submitLogs is set to false, no alarms will be triggered based on the logs submitted.

"submitLogs": {
         "alarmEnabled" :  false

Sending Log Files Automatically

If the "sendOnBoot" property of "submitLogs" is set to true, it will automatically send logs when the application boots up.

 "submitLogs": {
         "sendOnBoot": true

Configuring the Log File Directory

Specify the list of directories where log files can be found.

 "directories" : [
            {
                "application" : "application.name",
                "location" : "/sdcard/customapp/",
                "files" : "applog.txt"

Putting It All Together

For the example described above, the full configuration for the Logs to Azure feature is as follows:

{
  ....
  "loggingConnection" : "DefaultEndpointsProtocol=https;AccountName=blah;AccountKey=blah==;EndpointSuffix=core.windows.net",
  "loggingContainer" : "a-container-name",
  "submitLogs": {
         "enabled" :  true,
         "alarmEnabled" :  false,
         "sendOnBoot": true,
         "directories" : [
            {
                "application" : "application.name",
                "location" : "/sdcard/customapp/",
                "files" : "applog.txt"
            }
        ]
  },
  ...
}

Logs to Azure was introduced in Support Application 4.

Last updated