Skip to content

Commit

Permalink
Updated the protected Storage constructor in Storage.cs to coalesce t…
Browse files Browse the repository at this point in the history
…he supplied logger value to NullLoggerFactory.Instance, so that if a caller constructs an instance of BackblazeClient using the default logger value (which is null) then it still works.
  • Loading branch information
logiclrd committed Oct 8, 2024
1 parent 277b00e commit dae2174
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Client/Client/Storage/Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ protected Storage(HttpClient client, IClientOptions options, ILoggerFactory logg
try
{
// Initialize components
logger ??= NullLoggerFactory.Instance;

_client = new ApiClient(client, options, logger.CreateLogger<ApiClient>(), cache);
_logger = logger.CreateLogger<Storage>();
}
Expand Down

0 comments on commit dae2174

Please sign in to comment.