From d4af1040e090ee185e8d5ee558d7ecb9ef9814eb Mon Sep 17 00:00:00 2001 From: Espen Ekvang Date: Mon, 27 Nov 2017 16:44:49 +0100 Subject: [PATCH 1/8] Upgrade to .NET Standard --- Build.ps1 | 10 +- assets/CommonAssemblyInfo.cs | 6 +- serilog-sinks-azureeventhub.sln | 17 +-- .../Properties/AssemblyInfo.cs | 12 --- .../Serilog.Sinks.AzureEventHub.csproj | 101 ++---------------- src/Serilog.Sinks.AzureEventHub/app.config | 53 +++++---- .../packages.config | 7 -- 7 files changed, 62 insertions(+), 144 deletions(-) delete mode 100644 src/Serilog.Sinks.AzureEventHub/Properties/AssemblyInfo.cs delete mode 100644 src/Serilog.Sinks.AzureEventHub/packages.config diff --git a/Build.ps1 b/Build.ps1 index 185d930..eb17ba7 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -17,29 +17,29 @@ function Set-AssemblyVersions($informational, $assembly) function Install-NuGetPackages($solution) { - nuget restore $solution + .\nuget.exe restore $solution } function Invoke-MSBuild($solution, $customLogger) { if ($customLogger) { - msbuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger" + Invoke-MsBuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger" } else { - msbuild "$solution" /verbosity:minimal /p:Configuration=Release + Invoke-MsBuild "$solution" /verbosity:minimal /p:Configuration=Release } } function Invoke-NuGetPackProj($csproj) { - nuget pack -Prop Configuration=Release -Symbols $csproj + .\nuget.exe pack -Prop Configuration=Release -Symbols $csproj } function Invoke-NuGetPackSpec($nuspec, $version) { - nuget pack $nuspec -Version $version -OutputDirectory ..\..\ + .\nuget.exe pack $nuspec -Version $version -OutputDirectory ..\..\ } function Invoke-NuGetPack($version) diff --git a/assets/CommonAssemblyInfo.cs b/assets/CommonAssemblyInfo.cs index 0f5c380..d95ac06 100644 --- a/assets/CommonAssemblyInfo.cs +++ b/assets/CommonAssemblyInfo.cs @@ -1,5 +1,5 @@ using System.Reflection; -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.1.1.1")] -[assembly: AssemblyInformationalVersion("1.0.0")] +[assembly: AssemblyVersion("0.0.0.0")] +[assembly: AssemblyFileVersion("0.0.0.0")] +[assembly: AssemblyInformationalVersion("0.0.0")] diff --git a/serilog-sinks-azureeventhub.sln b/serilog-sinks-azureeventhub.sln index 7970b24..489e7c7 100644 --- a/serilog-sinks-azureeventhub.sln +++ b/serilog-sinks-azureeventhub.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.27004.2009 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.AzureEventHub", "src\Serilog.Sinks.AzureEventHub\Serilog.Sinks.AzureEventHub.csproj", "{F779C831-866F-4B87-B733-1BD1DB1E1606}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.AzureEventHub", "src\Serilog.Sinks.AzureEventHub\Serilog.Sinks.AzureEventHub.csproj", "{4F30F48A-E294-456B-810F-E6D5B0191421}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,12 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F779C831-866F-4B87-B733-1BD1DB1E1606}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F779C831-866F-4B87-B733-1BD1DB1E1606}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F779C831-866F-4B87-B733-1BD1DB1E1606}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F779C831-866F-4B87-B733-1BD1DB1E1606}.Release|Any CPU.Build.0 = Release|Any CPU + {4F30F48A-E294-456B-810F-E6D5B0191421}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F30F48A-E294-456B-810F-E6D5B0191421}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F30F48A-E294-456B-810F-E6D5B0191421}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F30F48A-E294-456B-810F-E6D5B0191421}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E0B607D3-51F2-4422-AD79-617F980AE0F1} + EndGlobalSection EndGlobal diff --git a/src/Serilog.Sinks.AzureEventHub/Properties/AssemblyInfo.cs b/src/Serilog.Sinks.AzureEventHub/Properties/AssemblyInfo.cs deleted file mode 100644 index d621a1a..0000000 --- a/src/Serilog.Sinks.AzureEventHub/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("Serilog.Sinks.AzureEventHub")] -[assembly: AssemblyDescription("Serilog sink for Azure Event Hub")] -[assembly: AssemblyCopyright("Copyright © Serilog Contributors 2015")] - -[assembly: InternalsVisibleTo("Serilog.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100fb8d13fd344a1c" + - "6fe0fe83ef33c1080bf30690765bc6eb0df26ebfdf8f21670c64265b30db09f73a0dea5b3db4c9" + - "d18dbf6d5a25af5ce9016f281014d79dc3b4201ac646c451830fc7e61a2dfd633d34c39f87b818" + - "94191652df5ac63cc40c77f3542f702bda692e6e8a9158353df189007a49da0f3cfd55eb250066" + - "b19485ec")] \ No newline at end of file diff --git a/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj b/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj index ca63295..673524d 100644 --- a/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj +++ b/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj @@ -1,95 +1,14 @@ - - - + + - Debug - AnyCPU - {F779C831-866F-4B87-B733-1BD1DB1E1606} - Library - Properties - Serilog - Serilog.Sinks.AzureEventHub - v4.5 - 512 + netstandard2.0 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Serilog.Sinks.AzureEventHub.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - - - ..\..\assets\Serilog.snk - - - - ..\..\packages\WindowsAzure.ServiceBus.3.4.0\lib\net45-full\Microsoft.ServiceBus.dll - True - - - ..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.1\lib\net40\Microsoft.WindowsAzure.Configuration.dll - True - - - ..\..\packages\Serilog.2.3.0\lib\net45\Serilog.dll - True - - - ..\..\packages\Serilog.Sinks.PeriodicBatching.2.0.1\lib\net45\Serilog.Sinks.PeriodicBatching.dll - True - - - - - - - - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - - + - - Serilog.snk - - - - - Designer - + + + + - - - \ No newline at end of file + + diff --git a/src/Serilog.Sinks.AzureEventHub/app.config b/src/Serilog.Sinks.AzureEventHub/app.config index 13e8220..1b7ec78 100644 --- a/src/Serilog.Sinks.AzureEventHub/app.config +++ b/src/Serilog.Sinks.AzureEventHub/app.config @@ -1,21 +1,21 @@  - + + serviceUri=""/> + serviceUri="" cacheTimeout="86400"/> @@ -23,26 +23,41 @@ - - - + + + - - - - - + + + + + - - - - - - - + + + + + + + - \ No newline at end of file + diff --git a/src/Serilog.Sinks.AzureEventHub/packages.config b/src/Serilog.Sinks.AzureEventHub/packages.config deleted file mode 100644 index f8d54d7..0000000 --- a/src/Serilog.Sinks.AzureEventHub/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file From 705c81f9fb033a4740e7caa7ebdb2a7e4a2af9d7 Mon Sep 17 00:00:00 2001 From: Espen Ekvang Date: Tue, 28 Nov 2017 05:49:16 +0100 Subject: [PATCH 2/8] Add appveyor.yml and update Build.ps1 accordingly --- Build.ps1 | 99 ++++++++++++++++------------------------------------ appveyor.yml | 11 ++++++ 2 files changed, 42 insertions(+), 68 deletions(-) create mode 100644 appveyor.yml diff --git a/Build.ps1 b/Build.ps1 index eb17ba7..8349021 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -1,85 +1,48 @@ -param( - [String] $majorMinor = "0.0", # 2.0 - [String] $patch = "0", # $env:APPVEYOR_BUILD_VERSION - [String] $customLogger = "", # C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll - [Switch] $notouch, - [String] $sln # e.g serilog-sink-name -) +echo "build: Build started" -function Set-AssemblyVersions($informational, $assembly) -{ - (Get-Content assets/CommonAssemblyInfo.cs) | - ForEach-Object { $_ -replace """1.0.0.0""", """$assembly""" } | - ForEach-Object { $_ -replace """1.0.0""", """$informational""" } | - ForEach-Object { $_ -replace """1.1.1.1""", """$($informational).0""" } | - Set-Content assets/CommonAssemblyInfo.cs -} +Push-Location $PSScriptRoot -function Install-NuGetPackages($solution) -{ - .\nuget.exe restore $solution +if(Test-Path .\artifacts) { + echo "build: Cleaning .\artifacts" + Remove-Item .\artifacts -Force -Recurse } -function Invoke-MSBuild($solution, $customLogger) -{ - if ($customLogger) - { - Invoke-MsBuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger" - } - else - { - Invoke-MsBuild "$solution" /verbosity:minimal /p:Configuration=Release - } -} +& dotnet restore --no-cache -function Invoke-NuGetPackProj($csproj) -{ - .\nuget.exe pack -Prop Configuration=Release -Symbols $csproj -} +$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL]; +$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; +$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"] +$commitHash = $(git rev-parse --short HEAD) +$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""] -function Invoke-NuGetPackSpec($nuspec, $version) -{ - .\nuget.exe pack $nuspec -Version $version -OutputDirectory ..\..\ -} +echo "build: Package version suffix is $suffix" +echo "build: Build version suffix is $buildSuffix" -function Invoke-NuGetPack($version) -{ - ls src/**/*.csproj | - Where-Object { -not ($_.Name -like "*net40*") } | - ForEach-Object { Invoke-NuGetPackProj $_ } -} - -function Invoke-Build($majorMinor, $patch, $customLogger, $notouch, $sln) -{ - $package="$majorMinor.$patch" - $slnfile = "$sln.sln" - - Write-Output "$sln $package" +foreach ($src in ls src/*) { + Push-Location $src - if (-not $notouch) - { - $assembly = "$majorMinor.0.0" + echo "build: Packaging project in $src" - Write-Output "Assembly version will be set to $assembly" - Set-AssemblyVersions $package $assembly + & dotnet build -c Release --version-suffix=$buildSuffix + if ($suffix) { + & dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix --no-build + } else { + & dotnet pack -c Release --include-source -o ..\..\artifacts --no-build } + if($LASTEXITCODE -ne 0) { exit 1 } - Install-NuGetPackages $slnfile - - Invoke-MSBuild $slnfile $customLogger - - Invoke-NuGetPack $package + Pop-Location } -$ErrorActionPreference = "Stop" +foreach ($test in ls test/*.Tests) { + Push-Location $test + + echo "build: Testing project in $test" -if (-not $sln) -{ - $slnfull = ls *.sln | - Where-Object { -not ($_.Name -like "*net40*") } | - Select -first 1 + & dotnet test -c Release + if($LASTEXITCODE -ne 0) { exit 3 } - $sln = $slnfull.BaseName + Pop-Location } -Invoke-Build $majorMinor $patch $customLogger $notouch $sln +Pop-Location \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..67926ac --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,11 @@ +version: '{build}' +skip_tags: true +image: Visual Studio 2017 +configuration: Release +install: + - ps: mkdir -Force ".\build\" | Out-Null +build_script: +- ps: ./Build.ps1 +test: off +artifacts: +- path: artifacts/Serilog.*.nupkg \ No newline at end of file From ac83d7a4c1ddc3fd32f7fc6bb1ecc6ef7f5ca85b Mon Sep 17 00:00:00 2001 From: Espen Ekvang Date: Tue, 28 Nov 2017 09:55:36 +0100 Subject: [PATCH 3/8] Use Microsoft.Azure.EventHubs --- .../LoggerConfigurationAzureEventHubExtensions.cs | 2 +- .../Serilog.Sinks.AzureEventHub.csproj | 4 ++-- .../Sinks/AzureEventHub/AzureEventHubBatchingSink.cs | 11 ++++------- .../Sinks/AzureEventHub/AzureEventHubSink.cs | 11 +++++------ 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/Serilog.Sinks.AzureEventHub/LoggerConfigurationAzureEventHubExtensions.cs b/src/Serilog.Sinks.AzureEventHub/LoggerConfigurationAzureEventHubExtensions.cs index 6133fce..a150663 100644 --- a/src/Serilog.Sinks.AzureEventHub/LoggerConfigurationAzureEventHubExtensions.cs +++ b/src/Serilog.Sinks.AzureEventHub/LoggerConfigurationAzureEventHubExtensions.cs @@ -14,7 +14,7 @@ using System; using System.Diagnostics.CodeAnalysis; -using Microsoft.ServiceBus.Messaging; +using Microsoft.Azure.EventHubs; using Serilog.Configuration; using Serilog.Core; using Serilog.Events; diff --git a/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj b/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj index 673524d..e98f79f 100644 --- a/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj +++ b/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj @@ -5,10 +5,10 @@ - + + - diff --git a/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubBatchingSink.cs b/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubBatchingSink.cs index b02ab87..5346cc0 100644 --- a/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubBatchingSink.cs +++ b/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubBatchingSink.cs @@ -17,7 +17,7 @@ using System.IO; using System.Text; using System.Threading.Tasks; -using Microsoft.ServiceBus.Messaging; +using Microsoft.Azure.EventHubs; using Serilog.Events; using Serilog.Formatting; using Serilog.Sinks.PeriodicBatching; @@ -76,16 +76,13 @@ protected override Task EmitBatchAsync(IEnumerable events) _formatter.Format(logEvent, render); body = Encoding.UTF8.GetBytes(render.ToString()); } - var eventHubData = new EventData(body) - { - PartitionKey = batchPartitionKey - }; + var eventHubData = new EventData(body); + eventHubData.Properties.Add("Type", "SerilogEvent"); batchedEvents.Add(eventHubData); } - - return _eventHubClient.SendBatchAsync(batchedEvents); + return _eventHubClient.SendAsync(batchedEvents, batchPartitionKey); } } } diff --git a/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubSink.cs b/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubSink.cs index 395938f..afcd048 100644 --- a/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubSink.cs +++ b/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubSink.cs @@ -15,7 +15,7 @@ using System; using System.IO; using System.Text; -using Microsoft.ServiceBus.Messaging; +using Microsoft.Azure.EventHubs; using Serilog.Core; using Serilog.Events; using Serilog.Formatting; @@ -55,13 +55,12 @@ public void Emit(LogEvent logEvent) _formatter.Format(logEvent, render); body = Encoding.UTF8.GetBytes(render.ToString()); } - var eventHubData = new EventData(body) - { - PartitionKey = Guid.NewGuid().ToString() - }; + var eventHubData = new EventData(body); eventHubData.Properties.Add("Type", "SerilogEvent"); - _eventHubClient.Send(eventHubData); + //Unfortunately no support for async in Serilog yet + //https://github.com/serilog/serilog/issues/134 + _eventHubClient.SendAsync(eventHubData, Guid.NewGuid().ToString()).GetAwaiter().GetResult(); } } } \ No newline at end of file From 788728540fb4f979cf1c4ac57d70e36f8f851048 Mon Sep 17 00:00:00 2001 From: Espen Ekvang Date: Tue, 28 Nov 2017 09:59:11 +0100 Subject: [PATCH 4/8] Add .vs folder to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index fd5204b..6cd4bdb 100644 --- a/.gitignore +++ b/.gitignore @@ -181,3 +181,6 @@ UpgradeLog*.htm # Microsoft Fakes FakesAssemblies/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ \ No newline at end of file From 06f6b560fdd4daf39ea227fee6d757a1a1240ad5 Mon Sep 17 00:00:00 2001 From: Espen Ekvang Date: Tue, 28 Nov 2017 10:06:56 +0100 Subject: [PATCH 5/8] Use EventHubsConnectionStringBuilder to include eventhubname in connectionstring --- Build.ps1 | 11 ----------- .../LoggerConfigurationAzureEventHubExtensions.cs | 13 +++++++++++-- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index 8349021..3574ff0 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -34,15 +34,4 @@ foreach ($src in ls src/*) { Pop-Location } -foreach ($test in ls test/*.Tests) { - Push-Location $test - - echo "build: Testing project in $test" - - & dotnet test -c Release - if($LASTEXITCODE -ne 0) { exit 3 } - - Pop-Location -} - Pop-Location \ No newline at end of file diff --git a/src/Serilog.Sinks.AzureEventHub/LoggerConfigurationAzureEventHubExtensions.cs b/src/Serilog.Sinks.AzureEventHub/LoggerConfigurationAzureEventHubExtensions.cs index a150663..8b7821d 100644 --- a/src/Serilog.Sinks.AzureEventHub/LoggerConfigurationAzureEventHubExtensions.cs +++ b/src/Serilog.Sinks.AzureEventHub/LoggerConfigurationAzureEventHubExtensions.cs @@ -153,7 +153,12 @@ public static LoggerConfiguration AzureEventHub( if (string.IsNullOrWhiteSpace(eventHubName)) throw new ArgumentNullException("eventHubName"); - var client = EventHubClient.CreateFromConnectionString(connectionString, eventHubName); + var connectionstringBuilder = new EventHubsConnectionStringBuilder(connectionString) + { + EntityPath = eventHubName + }; + + var client = EventHubClient.CreateFromConnectionString(connectionstringBuilder.ToString()); return AzureEventHub(loggerConfiguration, client, outputTemplate, formatProvider, restrictedToMinimumLevel, writeInBatches, period, batchPostingLimit); } @@ -190,7 +195,11 @@ public static LoggerConfiguration AzureEventHub( if (string.IsNullOrWhiteSpace(eventHubName)) throw new ArgumentNullException("eventHubName"); - var client = EventHubClient.CreateFromConnectionString(connectionString, eventHubName); + var connectionStringBuilder = new EventHubsConnectionStringBuilder(connectionString) + { + EntityPath = eventHubName + }; + var client = EventHubClient.CreateFromConnectionString(connectionStringBuilder.ToString()); return AzureEventHub(loggerConfiguration, formatter, client, restrictedToMinimumLevel, writeInBatches, period, batchPostingLimit); } From 711161a34ac1efddf442846c02a2710cb1a5978d Mon Sep 17 00:00:00 2001 From: Espen Ekvang Date: Wed, 29 Nov 2017 08:16:46 +0100 Subject: [PATCH 6/8] Add deploy step to appveyor.yml --- appveyor.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 67926ac..9cdbbb1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,4 +8,18 @@ build_script: - ps: ./Build.ps1 test: off artifacts: -- path: artifacts/Serilog.*.nupkg \ No newline at end of file +- path: artifacts/Serilog.*.nupkg +deploy: +- provider: NuGet + api_key: + secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x + skip_symbols: true + on: + branch: /^(master|dev)$/ +- provider: GitHub + auth_token: + secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX + artifact: /Serilog.*\.nupkg/ + tag: v$(appveyor_build_version) + on: + branch: master \ No newline at end of file From 0c897ef8d8e3af603a9f94d3699765c93077e234 Mon Sep 17 00:00:00 2001 From: Espen Ekvang Date: Wed, 29 Nov 2017 08:19:48 +0100 Subject: [PATCH 7/8] Remove CommonAssemblyInfo.cs --- assets/CommonAssemblyInfo.cs | 5 ----- .../Sinks/AzureEventHub/AzureEventHubBatchingSink.cs | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 assets/CommonAssemblyInfo.cs diff --git a/assets/CommonAssemblyInfo.cs b/assets/CommonAssemblyInfo.cs deleted file mode 100644 index d95ac06..0000000 --- a/assets/CommonAssemblyInfo.cs +++ /dev/null @@ -1,5 +0,0 @@ -using System.Reflection; - -[assembly: AssemblyVersion("0.0.0.0")] -[assembly: AssemblyFileVersion("0.0.0.0")] -[assembly: AssemblyInformationalVersion("0.0.0")] diff --git a/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubBatchingSink.cs b/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubBatchingSink.cs index 5346cc0..cc2b7eb 100644 --- a/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubBatchingSink.cs +++ b/src/Serilog.Sinks.AzureEventHub/Sinks/AzureEventHub/AzureEventHubBatchingSink.cs @@ -29,8 +29,8 @@ namespace Serilog.Sinks.AzureEventHub /// public class AzureEventHubBatchingSink : PeriodicBatchingSink { - readonly EventHubClient _eventHubClient; - readonly ITextFormatter _formatter; + private readonly EventHubClient _eventHubClient; + private readonly ITextFormatter _formatter; /// /// Construct a sink that saves log events to the specified EventHubClient. From d3605ec4297db52b0d21fe20599ba155d1485654 Mon Sep 17 00:00:00 2001 From: Espen Ekvang Date: Wed, 29 Nov 2017 08:33:02 +0100 Subject: [PATCH 8/8] Add versioninfo to csproj --- .../Serilog.Sinks.AzureEventHub.csproj | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj b/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj index e98f79f..e9ffaad 100644 --- a/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj +++ b/src/Serilog.Sinks.AzureEventHub/Serilog.Sinks.AzureEventHub.csproj @@ -1,14 +1,32 @@ - - netstandard2.0 - + + Write Serilog events to Azure Event Hub + 4.0.0 + Serilog Contributors + netstandard2.0 + true + Serilog.Sinks.AzureEventHub + ../../assets/Serilog.snk + true + true + Serilog.Sinks.AzureEventHub + serilog;;azure;eventhub + http://serilog.net/images/serilog-sink-nuget.png + http://serilog.net + http://www.apache.org/licenses/LICENSE-2.0 + false + Serilog + true + + true + - - - - - - + + + + + +