NLog Target for Azure Blob and Table Storage.
<targets>
<target xsi:type="AzureBlobStorage"
name="String"
layout="Layout"
blobName="Layout"
connectionString="String"
connectionStringKey="String"
container="Layout" />
</targets>
name - Name of the target.
layout - Text to be rendered. Layout Required.
blobName - BlobName. Layout
connectionString - Azure storage connection string. Must provide either connectionString or connectionStringKey.
connectionStringKey - App key name of Azure storage connection string. Must provide either connectionString or connectionStringKey.
container - Azure blob container name. Layout
<targets>
<target xsi:type="AzureTableStorage"
name="String"
layout="Layout"
connectionString="String"
connectionStringKey="String"
tableName="Layout" />
</targets>
name - Name of the target.
layout - Text to be rendered. Layout Required.
connectionString - Azure storage connection string. Must provide either connectionString or connectionStringKey.
connectionStringKey - App key name of Azure storage connection string. Must provide either connectionString or connectionStringKey.
tableName - Azure table name. Layout
<targets async="true">
<target type="AzureBlobStorage"
name="AzureEmulator"
layout="${longdate:universalTime=true} ${level:uppercase=true} - ${logger}: ${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=1000}"
connectionString="UseDevelopmentStorage=true;"
container="${level}"
blobName="${date:universalTime=true:format=yyyy-MM-dd}/${date:universalTime=true:format=HH}.log" />
<target type="AzureBlobStorage"
name="Azure"
layout="${longdate:universalTime=true} ${level:uppercase=true} - ${logger}: ${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=1000}"
connectionStringKey="storageConnectionString"
container="${machinename}"
blobName="${logger}/${date:universalTime=true:format=yy-MM-dd}/${date:universalTime=true:format=mm}.log" />
<target type="AzureTableStorage"
name="AzureTable"
connectionStringKey="storageConnectionString"
layout="${longdate:universalTime=true} ${level:uppercase=true} - ${logger}: ${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=1000}"
tableName="NlogTable" />
</targets>