Skip to content
Merged
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
1 change: 0 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ dotnet --info
dotnet restore

for path in src/**/*.csproj; do
dotnet build -f netstandard1.3 -c Release ${path}
dotnet build -f netstandard2.0 -c Release ${path}

done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
#if ASYNCLOCAL
using System.Threading;
#else
using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
#endif
using Microsoft.Extensions.Logging;
using Serilog.Core;
using Serilog.Events;
Expand Down Expand Up @@ -93,7 +88,6 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
}
}

#if ASYNCLOCAL
readonly AsyncLocal<SerilogLoggerScope> _value = new AsyncLocal<SerilogLoggerScope>();

internal SerilogLoggerScope CurrentScope
Expand All @@ -107,22 +101,6 @@ internal SerilogLoggerScope CurrentScope
_value.Value = value;
}
}
#else
readonly string _currentScopeKey = nameof(SerilogLoggerScope) + "#" + Guid.NewGuid().ToString("n");

internal SerilogLoggerScope CurrentScope
{
get
{
var objectHandle = CallContext.LogicalGetData(_currentScopeKey) as ObjectHandle;
return objectHandle?.Unwrap() as SerilogLoggerScope;
}
set
{
CallContext.LogicalSetData(_currentScopeKey, new ObjectHandle(value));
}
}
#endif

/// <inheritdoc />
public void Dispose()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Low-level Serilog provider for Microsoft.Extensions.Logging</Description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net472</TargetFrameworks>
Expand Down