mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-15 14:19:29 +00:00
Remove null check for flow id in scoped loggers (#15)
This commit is contained in:
@@ -71,7 +71,7 @@ namespace System.Logging
|
||||
|
||||
public static ScopedLogger<T> Create(ILogger<T> logger, string scope, string flowId)
|
||||
{
|
||||
return new ScopedLogger<T>(logger, scope.ThrowIfNull(nameof(scope)), flowId.ThrowIfNull(nameof(flowId)));
|
||||
return new ScopedLogger<T>(logger, scope.ThrowIfNull(nameof(scope)), flowId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<RootNamespace>System</RootNamespace>
|
||||
<Version>1.4</Version>
|
||||
<Version>1.4.1</Version>
|
||||
<Authors>Alexandru Macocian</Authors>
|
||||
<RepositoryUrl>https://github.com/AlexMacocian/SystemExtensions</RepositoryUrl>
|
||||
<Description>Extensions for the System namespace</Description>
|
||||
|
||||
@@ -33,15 +33,9 @@ namespace System.Logging.Tests
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void CreateLogger_NullFlow_ThrowsArgumentNullException()
|
||||
public void CreateLogger_NullFlow_ReturnsScopedLogger()
|
||||
{
|
||||
var action = new Action(() =>
|
||||
{
|
||||
var scopedLogger = this.cachingLogger.CreateScopedLogger(nameof(this.CreateLogger_NullFlow_ThrowsArgumentNullException), null);
|
||||
});
|
||||
|
||||
|
||||
action.Should().Throw<ArgumentNullException>();
|
||||
var scopedLogger = this.cachingLogger.CreateScopedLogger(nameof(this.CreateLogger_NullFlow_ReturnsScopedLogger), null);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
Reference in New Issue
Block a user