Skip to content

Commit 16b1730

Browse files
CopilotReubenBond
andcommitted
Remove redundant options logging and change log level to Debug
Co-authored-by: ReubenBond <[email protected]>
1 parent 1eabd40 commit 16b1730

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureBlobStorage.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ private async Task Init(CancellationToken ct)
240240

241241
try
242242
{
243-
LogInformationInitializing(this.options);
243+
LogDebugInitializing(this.name, this.options.ContainerName);
244244
if (options.CreateClient is not { } createClient)
245245
{
246246
throw new OrleansConfigurationException($"No credentials specified. Use the {options.GetType().Name}.{nameof(AzureBlobStorageOptions.ConfigureBlobServiceClient)} method to configure the Azure Blob Service client.");
@@ -365,11 +365,11 @@ private async Task Init(CancellationToken ct)
365365
private partial void LogTraceContainerNotFound(string grainType, GrainId grainId, string? eTag, string blobName, string containerName);
366366

367367
[LoggerMessage(
368-
Level = LogLevel.Information,
368+
Level = LogLevel.Debug,
369369
EventId = (int)AzureProviderErrorCode.AzureTableProvider_InitProvider,
370-
Message = "AzureBlobGrainStorage initializing: {Options}"
370+
Message = "AzureBlobGrainStorage {Name} is initializing: ContainerName={ContainerName}"
371371
)]
372-
private partial void LogInformationInitializing(AzureBlobStorageOptions options);
372+
private partial void LogDebugInitializing(string name, string containerName);
373373

374374
[LoggerMessage(
375375
Level = LogLevel.Information,

src/Azure/Orleans.Persistence.AzureStorage/Providers/Storage/AzureTableStorage.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ private async Task Init(CancellationToken ct)
490490
var stopWatch = Stopwatch.StartNew();
491491
try
492492
{
493-
LogInfoStorageInitializing(name, this.options);
493+
LogDebugStorageInitializing(name, this.options.TableName);
494494
this.tableDataManager = new GrainStateTableDataManager(this.options, this.logger);
495495
await this.tableDataManager.InitTableAsync();
496496
stopWatch.Stop();
@@ -566,10 +566,10 @@ public void Participate(ISiloLifecycle lifecycle)
566566

567567
[LoggerMessage(
568568
EventId = (int)AzureProviderErrorCode.AzureTableProvider_InitProvider,
569-
Level = LogLevel.Information,
570-
Message = "AzureTableGrainStorage {ProviderName} initializing: {Options}"
569+
Level = LogLevel.Debug,
570+
Message = "AzureTableGrainStorage {ProviderName} is initializing: TableName={TableName}"
571571
)]
572-
private partial void LogInfoStorageInitializing(string providerName, AzureTableStorageOptions options);
572+
private partial void LogDebugStorageInitializing(string providerName, string tableName);
573573

574574
[LoggerMessage(
575575
EventId = (int)AzureProviderErrorCode.AzureTableProvider_InitProvider,

0 commit comments

Comments
 (0)