Skip to content

Commit cfdf25b

Browse files
committed
Version 4.0.3
1 parent 94758b4 commit cfdf25b

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
### 4.0.3 08/20/2024
4+
- Changed constructors using a managedIdentityClientId to make it optional. If not provided, the sink will use the default Azure credential chain.
5+
- Updated Nugets for Serilog and Azure.Storage.Blobs to the latest versions.
6+
37
### 4.0.2 07/23/2024
48
- Updated System.Text.Json to 8.0.4 to address [CVE-2024-30105](https://github.com/advisories/GHSA-hh2w-p6rv-4g7w).
59
- Replaced Microsoft.Extensions.Hosting with Microsoft.Extensions.Configuration.Abstractions.

src/Serilog.Sinks.AzureBlobStorage/LoggerConfigurationAzureBlobStorageExtensions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ public static LoggerConfiguration AzureBlobStorage(this LoggerSinkConfiguration
525525
/// </summary>
526526
/// <param name="loggerConfiguration">The logger configuration.</param>
527527
/// <param name="formatter">Use a Serilog ITextFormatter such as CompactJsonFormatter to store object in data column of Azure blob</param>
528+
/// <param name="managedIdentityClientId">Specifies the client id of the Azure ManagedIdentity in the case of user assigned identity.</param>
528529
/// <param name="storageAccountUri">The Cloud Storage Account Uri to use to authenticate using Azure Identity</param>
529530
/// <param name="restrictedToMinimumLevel">The minimum log event level required in order to write an event to the sink.</param>
530531
/// <param name="storageContainerName">Container where the log entries will be written to.</param>
@@ -536,14 +537,13 @@ public static LoggerConfiguration AzureBlobStorage(this LoggerSinkConfiguration
536537
/// <param name="contentType">The content type to use for the Azure Append Blob. The default is text/plain.</param>
537538
/// <param name="blobSizeLimitBytes">The maximum file size to allow before a new one is rolled, expressed in bytes.</param>
538539
/// <param name="retainedBlobCountLimit">The number of latest blobs to be retained in the container always. Deletes older blobs when this limit is crossed.</param>
539-
/// <param name="managedIdentityClientId">Specifies the client id of the Azure ManagedIdentity in the case of user assigned identity.</param>
540540
/// <param name="useUtcTimeZone">Use UTC Timezone for logging events.</param>
541541
/// <returns>Logger configuration, allowing configuration to continue.</returns>
542542
/// <exception cref="ArgumentNullException">A required parameter is null.</exception>
543543
public static LoggerConfiguration AzureBlobStorage(this LoggerSinkConfiguration loggerConfiguration,
544544
ITextFormatter formatter,
545-
string managedIdentityClientId,
546545
Uri storageAccountUri,
546+
string managedIdentityClientId = null,
547547
LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum,
548548
string storageContainerName = null,
549549
string storageFileName = null,
@@ -610,6 +610,7 @@ public static LoggerConfiguration AzureBlobStorage(this LoggerSinkConfiguration
610610
/// </summary>
611611
/// <param name="loggerConfiguration">The logger configuration.</param>
612612
/// <param name="storageAccountUri">The Cloud Storage Account Uri to use to authenticate using Azure Identity</param>
613+
/// <param name="managedIdentityClientId">Specifies the client id of the Azure ManagedIdentity in the case of user assigned identity.</param>
613614
/// <param name="restrictedToMinimumLevel">The minimum log event level required in order to write an event to the sink.</param>
614615
/// <param name="storageContainerName">Container where the log entries will be written to.</param>
615616
/// <param name="storageFileName">File name that log entries will be written to.</param>
@@ -622,13 +623,12 @@ public static LoggerConfiguration AzureBlobStorage(this LoggerSinkConfiguration
622623
/// <param name="contentType">The content type to use for the Azure Append Blob. The default is text/plain.</param>
623624
/// <param name="blobSizeLimitBytes">The maximum file size to allow before a new one is rolled, expressed in bytes.</param>
624625
/// <param name="retainedBlobCountLimit">The number of latest blobs to be retained in the container always. Deletes older blobs when this limit is crossed.</param>
625-
/// <param name="managedIdentityClientId">Specifies the client id of the Azure ManagedIdentity in the case of user assigned identity.</param>
626626
/// <param name="useUtcTimeZone">Use UTC Timezone for logging events.</param>
627627
/// <returns>Logger configuration, allowing configuration to continue.</returns>
628628
/// <exception cref="ArgumentNullException">A required parameter is null.</exception>
629629
public static LoggerConfiguration AzureBlobStorage(this LoggerSinkConfiguration loggerConfiguration,
630-
string managedIdentityClientId,
631630
Uri storageAccountUri,
631+
string managedIdentityClientId = null,
632632
LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum,
633633
string storageContainerName = null,
634634
string storageFileName = null,
@@ -653,8 +653,8 @@ public static LoggerConfiguration AzureBlobStorage(this LoggerSinkConfiguration
653653
return AzureBlobStorage(
654654
loggerConfiguration,
655655
new MessageTemplateTextFormatter(outputTemplate, formatProvider),
656-
managedIdentityClientId,
657656
storageAccountUri,
657+
managedIdentityClientId,
658658
restrictedToMinimumLevel,
659659
storageContainerName,
660660
storageFileName,

src/Serilog.Sinks.AzureBlobStorage/Serilog.Sinks.AzureBlobStorage.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838

3939
<ItemGroup>
4040
<PackageReference Include="Azure.Identity" Version="1.12.0" />
41-
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.0" />
41+
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.1" />
4242
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
43-
<PackageReference Include="Serilog" Version="4.0.0" />
43+
<PackageReference Include="Serilog" Version="4.0.1" />
4444

4545
</ItemGroup>
4646

tests/Serilog.Sinks.AzureBlobStorage.UnitTest/Serilog.Sinks.AzureBlobStorage.UnitTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ItemGroup>
1717
<PackageReference Include="FakeItEasy" Version="8.3.0" />
1818
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
19-
<PackageReference Include="Serilog" Version="4.0.0" />
19+
<PackageReference Include="Serilog" Version="4.0.1" />
2020
<PackageReference Include="xunit" Version="2.9.0" />
2121
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
2222
<PrivateAssets>all</PrivateAssets>

0 commit comments

Comments
 (0)