diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..a8bfd4c
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,16 @@
+
+
+ true
+
+
+
+ true
+ true
+ true
+ snupkg
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 0000000..7fa14b9
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/appveyor.yml b/appveyor.yml
index 628e491..9b1c1b8 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -7,18 +7,18 @@ build_script:
- ps: ./Build.ps1
test: off
artifacts:
-- path: artifacts/Serilog.*.nupkg
+- path: artifacts/Serilog.*nupkg
deploy:
- provider: NuGet
api_key:
secure: kYR3BYzJm3wSFbFjPhgTzuDHHcE8ApoNUmHvJvunWZ39nyrqVk6J6srjzYVQ7/gX
- skip_symbols: true
+ skip_symbols: false
on:
branch: /^(master|dev)$/
- provider: GitHub
auth_token:
secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX
- artifact: /Serilog.*\.nupkg/
+ artifact: /Serilog.*nupkg/
tag: v$(appveyor_build_version)
on:
branch: master
diff --git a/build.sh b/build.sh
index 6d1ff38..73b51d3 100644
--- a/build.sh
+++ b/build.sh
@@ -8,5 +8,5 @@ for path in src/**/*.csproj; do
done
for path in test/*.Tests/*.csproj; do
- dotnet test -f netcoreapp2.0 -c Release ${path}
+ dotnet test -c Release ${path}
done
\ No newline at end of file
diff --git a/global.json b/global.json
deleted file mode 100644
index e3bbb00..0000000
--- a/global.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "sdk": {
- "allowPrerelease": false,
- "version": "3.1.100",
- "rollForward": "latestFeature"
- }
-}
diff --git a/samples/Sample/Sample.csproj b/samples/Sample/Sample.csproj
index c557b8a..344101c 100644
--- a/samples/Sample/Sample.csproj
+++ b/samples/Sample/Sample.csproj
@@ -12,10 +12,10 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/serilog-extensions-logging.sln b/serilog-extensions-logging.sln
index c53414c..c8b2709 100644
--- a/serilog-extensions-logging.sln
+++ b/serilog-extensions-logging.sln
@@ -26,6 +26,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{9C21B9
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Extensions.Logging.Benchmarks", "test\Serilog.Extensions.Logging.Benchmarks\Serilog.Extensions.Logging.Benchmarks.csproj", "{6D5986FF-EECD-4E75-8BC6-A5F78AB549B2}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution items", "{137C37F5-9F88-4B53-90C5-5C66589FE067}"
+ ProjectSection(SolutionItems) = preProject
+ Directory.Build.props = Directory.Build.props
+ Directory.Packages.props = Directory.Packages.props
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extensions.Logging.Extensions", "src\Serilog.Extensions.Logging.Extensions\Serilog.Extensions.Logging.Extensions.csproj", "{8D7B8EAB-18F7-439F-A877-C6BD3070BCC0}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -48,6 +56,10 @@ Global
{6D5986FF-EECD-4E75-8BC6-A5F78AB549B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D5986FF-EECD-4E75-8BC6-A5F78AB549B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D5986FF-EECD-4E75-8BC6-A5F78AB549B2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8D7B8EAB-18F7-439F-A877-C6BD3070BCC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8D7B8EAB-18F7-439F-A877-C6BD3070BCC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8D7B8EAB-18F7-439F-A877-C6BD3070BCC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8D7B8EAB-18F7-439F-A877-C6BD3070BCC0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -57,6 +69,7 @@ Global
{37EADF84-5E41-4224-A194-1E3299DCD0B8} = {E30F638E-BBBE-4AD1-93CE-48CC69CFEFE1}
{65357FBC-9BC4-466D-B621-1C3A19BC2A78} = {F2407211-6043-439C-8E06-3641634332E7}
{6D5986FF-EECD-4E75-8BC6-A5F78AB549B2} = {E30F638E-BBBE-4AD1-93CE-48CC69CFEFE1}
+ {8D7B8EAB-18F7-439F-A877-C6BD3070BCC0} = {A1893BD1-333D-4DFE-A0F0-DDBB2FE526E0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {811E61C5-3871-4633-AFAE-B35B619C8A10}
diff --git a/src/Serilog.Extensions.Logging.Extensions/AliasedSerilogLoggerProvider.cs b/src/Serilog.Extensions.Logging.Extensions/AliasedSerilogLoggerProvider.cs
new file mode 100644
index 0000000..5eed9fb
--- /dev/null
+++ b/src/Serilog.Extensions.Logging.Extensions/AliasedSerilogLoggerProvider.cs
@@ -0,0 +1,30 @@
+// Copyright 2017 Serilog Contributors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using Microsoft.Extensions.Logging;
+using Serilog.Extensions.Logging;
+
+namespace Serilog
+{
+ ///
+ [ProviderAlias("Serilog")]
+ public class AliasedSerilogLoggerProvider : SerilogLoggerProvider
+ {
+ ///
+ public AliasedSerilogLoggerProvider(ILogger logger = null, bool dispose = false)
+ : base(logger, dispose)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Serilog.Extensions.Logging.Extensions/Serilog.Extensions.Logging.Extensions.csproj b/src/Serilog.Extensions.Logging.Extensions/Serilog.Extensions.Logging.Extensions.csproj
new file mode 100644
index 0000000..025de02
--- /dev/null
+++ b/src/Serilog.Extensions.Logging.Extensions/Serilog.Extensions.Logging.Extensions.csproj
@@ -0,0 +1,37 @@
+
+
+
+ Low-level Serilog provider for Microsoft.Extensions.Logging
+ 3.0.2
+ Microsoft;Serilog Contributors
+ netstandard2.0
+ true
+ true
+ Serilog.Extensions.Logging.Extensions
+ ../../assets/Serilog.snk
+ true
+ true
+ Serilog.Extensions.Logging.Extensions
+ serilog;Microsoft.Extensions.Logging
+ serilog-extension-nuget.png
+ https://github.com/serilog/serilog-extensions-logging
+ Apache-2.0
+ https://github.com/serilog/serilog-extensions-logging
+ git
+ false
+ Serilog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Serilog.Extensions.Logging/SerilogLoggingBuilderExtensions.cs b/src/Serilog.Extensions.Logging.Extensions/SerilogLogginBuilderExtensions.cs
similarity index 89%
rename from src/Serilog.Extensions.Logging/SerilogLoggingBuilderExtensions.cs
rename to src/Serilog.Extensions.Logging.Extensions/SerilogLogginBuilderExtensions.cs
index 2cf0008..b98b2c7 100644
--- a/src/Serilog.Extensions.Logging/SerilogLoggingBuilderExtensions.cs
+++ b/src/Serilog.Extensions.Logging.Extensions/SerilogLogginBuilderExtensions.cs
@@ -39,16 +39,16 @@ public static ILoggingBuilder AddSerilog(this ILoggingBuilder builder, ILogger l
if (dispose)
{
- builder.Services.AddSingleton(services => new SerilogLoggerProvider(logger, true));
+ builder.Services.AddSingleton(services => new AliasedSerilogLoggerProvider(logger, true));
}
else
{
- builder.AddProvider(new SerilogLoggerProvider(logger));
+ builder.AddProvider(new AliasedSerilogLoggerProvider(logger));
}
- builder.AddFilter(null, LogLevel.Trace);
+ builder.AddFilter(null, LogLevel.Trace);
return builder;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs b/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs
index d51c2c0..efdede3 100644
--- a/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs
+++ b/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs
@@ -15,7 +15,6 @@ namespace Serilog.Extensions.Logging
///
/// An that pipes events through Serilog.
///
- [ProviderAlias("Serilog")]
public class SerilogLoggerProvider : ILoggerProvider, ILogEventEnricher
{
internal const string OriginalFormatPropertyName = "{OriginalFormat}";
diff --git a/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj b/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj
index a67b319..9fa5452 100644
--- a/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj
+++ b/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj
@@ -1,10 +1,10 @@
-
+
Low-level Serilog provider for Microsoft.Extensions.Logging
3.0.2
Microsoft;Serilog Contributors
- netstandard2.0
+ netstandard2.0
true
true
Serilog.Extensions.Logging
@@ -27,8 +27,8 @@
-
-
+
+
diff --git a/test/Serilog.Extensions.Logging.Benchmarks/Serilog.Extensions.Logging.Benchmarks.csproj b/test/Serilog.Extensions.Logging.Benchmarks/Serilog.Extensions.Logging.Benchmarks.csproj
index 7840f21..9e90d8f 100644
--- a/test/Serilog.Extensions.Logging.Benchmarks/Serilog.Extensions.Logging.Benchmarks.csproj
+++ b/test/Serilog.Extensions.Logging.Benchmarks/Serilog.Extensions.Logging.Benchmarks.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ net5.0
true
@@ -10,13 +10,13 @@
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
diff --git a/test/Serilog.Extensions.Logging.Tests/Serilog.Extensions.Logging.Tests.csproj b/test/Serilog.Extensions.Logging.Tests/Serilog.Extensions.Logging.Tests.csproj
index e1a144a..f6b10ec 100644
--- a/test/Serilog.Extensions.Logging.Tests/Serilog.Extensions.Logging.Tests.csproj
+++ b/test/Serilog.Extensions.Logging.Tests/Serilog.Extensions.Logging.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.0;net472
+ net5.0
Serilog.Extensions.Logging.Tests
../../assets/Serilog.snk
true
@@ -15,9 +15,9 @@
-
-
-
+
+
+