Skip to content

Expose No-Op Logger Scope Provider and Scope #109082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
<ItemGroup>
<Compile Include="$(CommonPath)\Extensions\ProviderAliasUtilities\ProviderAliasUtilities.cs"
Link="Common\Extensions\ProviderAliasUtilities\ProviderAliasUtilities.cs" />
<Compile Include="$(CommonPath)Extensions\Logging\NullExternalScopeProvider.cs"
Link="Common\src\Extensions\Logging\NullExternalScopeProvider.cs" />
<Compile Include="$(CommonPath)Extensions\Logging\NullScope.cs"
Link="Common\src\Extensions\Logging\NullScope.cs" />
<Compile Include="$(CommonPath)Extensions\Logging\DebuggerDisplayFormatting.cs"
Link="Common\src\Extensions\Logging\DebuggerDisplayFormatting.cs" />
<Compile Include="$(CommonPath)System\ThrowHelper.cs"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
Expand All @@ -8,7 +8,7 @@ namespace Microsoft.Extensions.Logging
/// <summary>
/// Scope provider that does nothing.
/// </summary>
internal sealed class NullExternalScopeProvider : IExternalScopeProvider
public sealed class NullExternalScopeProvider : IExternalScopeProvider
{
private NullExternalScopeProvider()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;

namespace Microsoft.Extensions.Logging
{
/// <summary>
/// An empty scope without any logic
/// An empty scope without any logic.
/// </summary>
internal sealed class NullScope : IDisposable
public sealed class NullScope : IDisposable
{
/// <summary>
/// Provides a Null Scope Singleton.
/// </summary>
public static NullScope Instance { get; } = new NullScope();

private NullScope()
Expand Down
Loading