From 6046745219dc0414d876da4efab5a8258082ddde Mon Sep 17 00:00:00 2001 From: Matthew Erbs Date: Tue, 28 Jun 2016 19:34:18 +1000 Subject: [PATCH 1/4] Changes for 2.0 Release. --- README.md | 7 +++++++ appveyor.yml | 15 +++++++++++---- src/Serilog.Enrichers.Environment/project.json | 6 +++--- .../project.json | 2 +- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 998878e..04973f3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,13 @@ The environment enricher for Serilog. [![Build status](https://ci.appveyor.com/api/projects/status/yfbvbdxd5vwh6955?svg=true)](https://ci.appveyor.com/project/serilog/serilog-enrichers-environment) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Enrichers.Environment.svg?style=flat)](https://www.nuget.org/packages/Serilog.Enrichers.Environment/) + +To use the enricher, first install the NuGet package: + +```powershell +Install-Package Serilog.Enrichers.Environment +``` + * [Documentation](https://github.com/serilog/serilog/wiki) Copyright © 2016 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html). diff --git a/appveyor.yml b/appveyor.yml index da6effa..580b871 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,11 +1,12 @@ version: '{build}' +skip_tags: true image: Visual Studio 2015 configuration: Release install: - ps: mkdir -Force ".\build\" | Out-Null - - ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1" + - ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1" - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli" - - ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-002823' + - ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121' - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" build_script: - ps: ./Build.ps1 @@ -18,5 +19,11 @@ deploy: secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x skip_symbols: true on: - branch: /^(dev|master)$/ - + branch: /^(master)$/ +- provider: GitHub + auth_token: + secure: Bo3ypKpKFxinjR9ShkNekNvkob2iklHJU+UlYyfHtcFFIAa58SV2TkEd0xWxz633 + artifact: /Serilog.*\.nupkg/ + tag: v$(appveyor_build_version) + on: + branch: master \ No newline at end of file diff --git a/src/Serilog.Enrichers.Environment/project.json b/src/Serilog.Enrichers.Environment/project.json index e467583..c72db98 100644 --- a/src/Serilog.Enrichers.Environment/project.json +++ b/src/Serilog.Enrichers.Environment/project.json @@ -1,5 +1,5 @@ { - "version": "2.0.0-rc-*", + "version": "2.0.0-*", "description": "Enrich Serilog log events with properties from System.Environment.", "authors": [ "Serilog Contributors" @@ -15,7 +15,7 @@ "iconUrl": "http://serilog.net/images/serilog-enricher-nuget.png" }, "dependencies": { - "Serilog": "2.0.0-rc-556" + "Serilog": "2.0.0" }, "buildOptions": { "keyFile": "../../assets/Serilog.snk" @@ -27,7 +27,7 @@ }, "netstandard1.5": { "dependencies": { - "System.Runtime.Extensions": "4.1.0-rc2-24027" + "System.Runtime.Extensions": "4.1.0" } } } diff --git a/test/Serilog.Enrichers.Environment.Tests/project.json b/test/Serilog.Enrichers.Environment.Tests/project.json index 806e7be..dc4b361 100644 --- a/test/Serilog.Enrichers.Environment.Tests/project.json +++ b/test/Serilog.Enrichers.Environment.Tests/project.json @@ -16,7 +16,7 @@ "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0-rc2-3002702" + "version": "1.0.0" } }, "imports": [ From cf71228586fcba0d9d5c5cc40045051810699011 Mon Sep 17 00:00:00 2001 From: Matthew Erbs Date: Tue, 28 Jun 2016 19:45:55 +1000 Subject: [PATCH 2/4] Removed -* from versioning in project.json. --- src/Serilog.Enrichers.Environment/project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Serilog.Enrichers.Environment/project.json b/src/Serilog.Enrichers.Environment/project.json index c72db98..13c9a1e 100644 --- a/src/Serilog.Enrichers.Environment/project.json +++ b/src/Serilog.Enrichers.Environment/project.json @@ -1,5 +1,5 @@ { - "version": "2.0.0-*", + "version": "2.0.0", "description": "Enrich Serilog log events with properties from System.Environment.", "authors": [ "Serilog Contributors" From ab1df9f3d9496ff7110b4d410a7f246a4ba081e8 Mon Sep 17 00:00:00 2001 From: Matthew Erbs Date: Wed, 29 Jun 2016 07:39:33 +1000 Subject: [PATCH 3/4] Implemented new ILogger methods --- .../Support/DisposableLogger.cs | 305 ++++++++++++++++++ 1 file changed, 305 insertions(+) diff --git a/test/Serilog.Enrichers.Environment.Tests/Support/DisposableLogger.cs b/test/Serilog.Enrichers.Environment.Tests/Support/DisposableLogger.cs index 61d682a..ccff568 100644 --- a/test/Serilog.Enrichers.Environment.Tests/Support/DisposableLogger.cs +++ b/test/Serilog.Enrichers.Environment.Tests/Support/DisposableLogger.cs @@ -14,6 +14,11 @@ public void Dispose() Disposed = true; } + public ILogger ForContext(ILogEventEnricher enricher) + { + throw new NotImplementedException(); + } + public ILogger ForContext(IEnumerable enrichers) { throw new NotImplementedException(); @@ -39,11 +44,54 @@ public void Write(LogEvent logEvent) throw new NotImplementedException(); } + public void Write(LogEventLevel level, string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Write(LogEventLevel level, string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Write(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Write(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1, + T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Write(LogEventLevel level, string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Write(LogEventLevel level, Exception exception, string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Write(LogEventLevel level, Exception exception, string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Write(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, + T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Write(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, + T1 propertyValue1, T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Write(LogEventLevel level, Exception exception, string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); @@ -54,64 +102,321 @@ public bool IsEnabled(LogEventLevel level) throw new NotImplementedException(); } + public void Verbose(string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Verbose(string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Verbose(string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Verbose(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Verbose(string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Verbose(Exception exception, string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Verbose(Exception exception, string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Verbose(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Verbose(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, + T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Verbose(Exception exception, string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Debug(string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Debug(string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Debug(string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Debug(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Debug(string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Debug(Exception exception, string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Debug(Exception exception, string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Debug(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Debug(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, + T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Debug(Exception exception, string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Information(string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Information(string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Information(string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Information(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Information(string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Information(Exception exception, string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Information(Exception exception, string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Information(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Information(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, + T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Information(Exception exception, string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Warning(string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Warning(string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Warning(string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Warning(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Warning(string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Warning(Exception exception, string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Warning(Exception exception, string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Warning(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Warning(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, + T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Warning(Exception exception, string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Error(string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Error(string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Error(string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Error(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Error(string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Error(Exception exception, string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Error(Exception exception, string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Error(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Error(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, + T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Error(Exception exception, string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Fatal(string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Fatal(string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Fatal(string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Fatal(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Fatal(string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + public void Fatal(Exception exception, string messageTemplate) + { + throw new NotImplementedException(); + } + + public void Fatal(Exception exception, string messageTemplate, T propertyValue) + { + throw new NotImplementedException(); + } + + public void Fatal(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1) + { + throw new NotImplementedException(); + } + + public void Fatal(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, + T2 propertyValue2) + { + throw new NotImplementedException(); + } + public void Fatal(Exception exception, string messageTemplate, params object[] propertyValues) { throw new NotImplementedException(); } + + public bool BindMessageTemplate(string messageTemplate, object[] propertyValues, out MessageTemplate parsedTemplate, + out IEnumerable boundProperties) + { + throw new NotImplementedException(); + } + + public bool BindProperty(string propertyName, object value, bool destructureObjects, out LogEventProperty property) + { + throw new NotImplementedException(); + } } } \ No newline at end of file From ebd625daae3b8ea1e808c4cdf239328e5cb66c78 Mon Sep 17 00:00:00 2001 From: Matthew Erbs Date: Wed, 29 Jun 2016 08:56:59 +1000 Subject: [PATCH 4/4] Updated key for GitHub releases for AppVeyor. --- appveyor.yml | 2 +- build.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 build.sh diff --git a/appveyor.yml b/appveyor.yml index 580b871..2559411 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,7 +22,7 @@ deploy: branch: /^(master)$/ - provider: GitHub auth_token: - secure: Bo3ypKpKFxinjR9ShkNekNvkob2iklHJU+UlYyfHtcFFIAa58SV2TkEd0xWxz633 + secure: ggZTqqV1z0xecDoQbeoy3A7xikShCt9FWZIGp95dG9Fo0p5RAT9oGU0ZekHfUIwk artifact: /Serilog.*\.nupkg/ tag: v$(appveyor_build_version) on: diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..d58fe9e --- /dev/null +++ b/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash +dotnet restore +for path in src/*/project.json; do + dirname="$(dirname "${path}")" + dotnet build ${dirname} -c Release +done + +dotnet restore +for path in test/*/project.json; do + dirname="$(dirname "${path}")" + dotnet build ${dirname} -c Release +done \ No newline at end of file