The Akumina Logging Framework (available in AppManager Version 3.4 or later) enables the logging of AppManager errors, warnings, information, etc. You can configure logging settings in the “interchange.settings.config” file.
Setting the Log Levels:
The log levels are set in the following key:
<add key=”akumina:LogLevel” value=”2″ />
Level Values:
Log Level | Description |
---|---|
1 | Critical |
2 | Error (Default) |
3 | Warning |
4 | Informational |
5 | Verbose |
Configuring the Location to Save Logging Data:
Akumina supports saving the logging data into one or more locations using “listeners”. The logging data can be saved to a flat file or an Azure table. By default, we configure the FlatFile listener.
IMPORTANT:
- Instaling AppManager as a Web App MUST use an Azure Table
- Installing AppManager on a Virtual Machine can use either the Flat File or Azure Table.
Listener | Description |
---|---|
FlatFile | File based logging |
AzureTable | Logs to Microsoft Azure Storage Table |
Logging to a FlatFile:
First set the logging listener to FlatFile using the following key in “interchange.settings.config”:
<add key=”akumina:LogListener” value=”FlatFile” />
Next, specify the location of the file in which to save the data using the following:
<add key=”akumina:LogRemoteFileConnection” value=”” />
If the value is empty or the key is not present, then the log will use the current rootpath\logs folder. For another location, a fully qualified path is used. For example, “c:\logs\mysite\”.
Logging to an Azure Table
This section assumes you already have an Azure Storage Account configured. If you do not, please consult with your Azure support resource to establish an account. For reference on how to setup an Azure Storage Account, see Creating an Azure Storage
First set the logging listener to AzureTable using the following key in “interchange.settings.config”:
<add key=”akumina:LogListener” value=”AzureTable” />
Additionally, you must also configure the storage connection string using the following key:
<add key=”akumina:LogRemoteStorageConnection” value=”DefaultEndpointsProtocol=http;AccountName=myAccount;AccountKey=myKey;” />
Replace the highlighted value above with the Connection String generated in the Azure Storage Account which contains the protocol, account name and account key.
Example Connection String Value:
DefaultEndpointsProtocol=https;AccountName=akuminadev02logs;AccountKey=5W0jT33da5SLIX/DgtnjyHdYbyWk2JhVyeGfy7AXoRP7bps9L745WJLeHVMqhd3qsdOKQQEjPlf2ONMfYG4IWg==;
Lastly, you must add the following LogPrefix key as follows:
<add key=”akumina:LogPrefix” value=”mysitename”/>
Replacing “mysitename” with your WEBAPP Name
Example WebApp value:
<add key=”akumina:LogPrefix” value=”akqa13″ />
Creating an Azure Storage Account
This section is being provided for reference only. Microsoft updates their Azure interface regularly so the images and instructions may not be the most current. For issues, please consult Microsoft Documentation.
We recommend that your qualified Azure support resource perform these actions.
The following are the steps to create the Azure Storage Account to enable the Azure Table storage for the log file.
- Access Azure and navigate to “More Services” using the left panel link
- Scroll down to the Storage Section in the popup menu and select “Storage Accounts”
- In the Storage Account, click on “+Add”
In the Create Storage Account dialog, set the following values:
- Name (a unique name for your account)
- Deployment Model: Resource Manager
- Account kind: General Purpose
- Performance: Standard
- Replication: Locally-redundant storage (LRS)
- Storage service encryption: Disabled
- Subscription: Pay-As-You-Go
- Resource Group: Create New (use the same value as the Name set above)
- Location: East US (unless another location is closer to you)
- Click on the Create button
- Once the account is created, select the account and click on the “Access key” option in the account menu
- Copy one of the Connection String values that appear in the right pane and save to Notepad. It will be needed for a key value in the interchange.settings.config file.