Skip to content

Commit

Permalink
Merge pull request #1369 from serilog/dev
Browse files Browse the repository at this point in the history
2.9.0 Release
  • Loading branch information
nblumhardt committed Oct 13, 2019
2 parents 870feca + 2b13493 commit 655778f
Show file tree
Hide file tree
Showing 133 changed files with 1,352 additions and 830 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ insert_final_newline = true
indent_style = space
indent_size = 4

[*.{csproj,json,config,yml}]
[*.{csproj,json,config,yml,props}]
indent_size = 2

[*.sh]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,4 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/
*.orig
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
echo "build: Build started"

& dotnet --info
& dotnet --list-sdks

Push-Location $PSScriptRoot

if(Test-Path .\artifacts) {
Expand Down
2 changes: 1 addition & 1 deletion BuildNativeUWP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param(

echo "build: running .NET Native toolchain for UWP test project"

$msbuild = $(cmd /c where /R 'C:\Program Files (x86)\Microsoft Visual Studio\2017' msbuild.exe | select -First 1)
$msbuild = $(cmd /c where /R 'C:\Program Files (x86)\Microsoft Visual Studio\2019' msbuild.exe | select -First 1)

if ($customLogger) {
& $msbuild $proj /logger:"$customLogger" /verbosity:minimal /t:Restore
Expand Down
6 changes: 3 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* #939, #946, #972 - RTM .NET Standard/Core tooling
* #955 - `LoggerSinkConfiguration.Wrap()`
* #944 - `{Properties}` in output templates
* #961 - fix parser exeception when property tokens with zero-length names are encountered
* #961 - fix parser exception when property tokens with zero-length names are encountered
* #773 - `LogContext.Clone()` and `LogContext.Push(ILogEventEnricher)`
* #976 - support for logging C# 7 `ValueTuple<>` values
* #977 - output formatting performance improvements, `{Message:l}` (unquoted string) and `{Message:j}` (JSON structure) support in output templates
Expand Down Expand Up @@ -138,7 +138,7 @@ Plus multiple build/test/configuration improvements.2.4.0
* #402 - `<appSettings>` configuration support now in the Serilog package

1.4.214
* #344 - Moved "Extras" including Web, Owin, F#, destructuring to new organisations
* #344 - Moved "Extras" including Web, Owin, F#, destructuring to new organizations

1.4.204
* #344 (partial) - Moved remaining sinks to individual repositories
Expand Down Expand Up @@ -249,7 +249,7 @@ Plus multiple build/test/configuration improvements.2.4.0
* #229 - Created net40 version of Extras Topshelf
* #236 - Ensure dictionary keys are quoted in JSON even when they're numeric
* #237 - When `JsonFormatter` formats a dictionary of `<int, object>`, the key should be double quoted
* #235 - Fixed serialization of dicationary keys in ES and similar sinks
* #235 - Fixed serialization of dictionary keys in ES and similar sinks

1.4.11
* #238 - Dynamic level switching
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.1" PrivateAssets="All" />
</ItemGroup>
<!-- Workaround for https://github.com/dotnet/sdk/pull/908 -->
<Target Name="GetPackagingOutputs" />
<PropertyGroup>
<LangVersion>latest</LangVersion>
</PropertyGroup>
</Project>
7 changes: 7 additions & 0 deletions INFLUENCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Influences

Serilog draws directly on ideas found in:

* [.NET Framework](https://dot.net) &mdash; format string syntax adapted for message templates
* [Apache log4net](https://logging.apache.org/log4net/) &mdash; `ILogger` interface, levels, types/namespaces as log sources
* [Enterprise Library Semantic Logging Application Block](https://github.com/microsoftarchive/semantic-logging) (SLAB) &mdash; logs-as-event-streams
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Serilog has an active and helpful community who are happy to help point you in t
* Our [issue tracker](https://github.com/serilog/serilog/issues) here on GitHub
* [Gitter chat](https://gitter.im/serilog/serilog)
* The [#serilog tag on Twitter](https://twitter.com/search?q=%23serilog)
* [Serilog-related courses on Pluralsight](https://www.pluralsight.com/search/?q=serilog)

### Contributing

Expand All @@ -111,9 +112,9 @@ When contributing please keep in mind our [Code of Conduct](CODE_OF_CONDUCT.md).

### Detailed build status

Branch | AppVeyor | Travis
------------- | ------------- |-------------
dev | [![Build status](https://ci.appveyor.com/api/projects/status/b9rm3l7kduryjgcj/branch/dev?svg=true)](https://ci.appveyor.com/project/serilog/serilog/branch/dev) | [![Build Status](https://travis-ci.org/serilog/serilog.svg?branch=dev)](https://travis-ci.org/serilog/serilog)
master | [![Build status](https://ci.appveyor.com/api/projects/status/b9rm3l7kduryjgcj/branch/master?svg=true)](https://ci.appveyor.com/project/serilog/serilog/branch/master) | [![Build Status](https://travis-ci.org/serilog/serilog.svg?branch=master)](https://travis-ci.org/serilog/serilog)
Branch | AppVeyor
------------- | -------------
dev | [![Build status](https://ci.appveyor.com/api/projects/status/b9rm3l7kduryjgcj/branch/dev?svg=true)](https://ci.appveyor.com/project/serilog/serilog/branch/dev)
master | [![Build status](https://ci.appveyor.com/api/projects/status/b9rm3l7kduryjgcj/branch/master?svg=true)](https://ci.appveyor.com/project/serilog/serilog/branch/master)

_Serilog is copyright &copy; 2013-2018 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html). Needle and thread logo a derivative of work by [Kenneth Appiah](http://www.kensets.com/)._
6 changes: 3 additions & 3 deletions Serilog.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
# Visual Studio Version 16
VisualStudioVersion = 16.0.28917.182
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5E1-DEB9-4A04-8BAB-24EC7240ADAF}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
Build.ps1 = Build.ps1
build.sh = build.sh
BuildNativeUWP.ps1 = BuildNativeUWP.ps1
CHANGES.md = CHANGES.md
Directory.Build.props = Directory.Build.props
global.json = global.json
Expand Down
9 changes: 8 additions & 1 deletion Serilog.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ II.2.12 &lt;HandlesEvent /&gt;&#xD;
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -556,4 +557,10 @@ II.2.12 &lt;HandlesEvent /&gt;&#xD;


<s:String x:Key="/Default/FilterSettingsManager/AttributeFilterXml/@EntryValue">&lt;data /&gt;</s:String>
<s:String x:Key="/Default/FilterSettingsManager/CoverageFilterXml/@EntryValue">&lt;data&gt;&lt;IncludeFilters /&gt;&lt;ExcludeFilters /&gt;&lt;/data&gt;</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/FilterSettingsManager/CoverageFilterXml/@EntryValue">&lt;data&gt;&lt;IncludeFilters /&gt;&lt;ExcludeFilters /&gt;&lt;/data&gt;</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=auditable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=cacheable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=destructure/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Enricher/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Enrichers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Serilog/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
10 changes: 10 additions & 0 deletions Setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$ErrorActionPreference = "Stop"

$RequiredDotnetVersion = $(cat ./global.json | convertfrom-json).sdk.version

mkdir "./build"
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./build/installcli.ps1"
& ./build/installcli.ps1 -InstallDir "$pwd/.dotnetcli" -NoPath -Version $RequiredDotnetVersion
if ($LASTEXITCODE) { exit 1 }

$env:Path = "$pwd/.dotnetcli;$env:Path"
26 changes: 21 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
version: '{build}'
skip_tags: true
image: Visual Studio 2017
image:
- Visual Studio 2019
- Ubuntu1804
configuration: Release
test: off
install:
- ps: ./Setup.ps1
build_script:
- ps: ./Build.ps1
- ps: ./BuildNativeUWP.ps1
- ps: ./Build.ps1
- ps: ./BuildNativeUWP.ps1
for:
-
matrix:
only:
- image: Ubuntu1804
install:
- sh setup.sh
build_script:
- sh build.sh
artifacts:
- path: artifacts/Serilog.*.nupkg
- path: artifacts/Serilog.*.snupkg
deploy:
- provider: NuGet
api_key:
secure: bd9z4P73oltOXudAjPehwp9iDKsPtC+HbgshOrSgoyQKr5xVK+bxJQngrDJkHdY8
secure: N59tiJECUYpip6tEn0xvdmDAEiP9SIzyLEFLpwiigm/8WhJvBNs13QxzT1/3/JW/
skip_symbols: true
on:
branch: /^(master|dev)$/
- provider: GitHub
auth_token:
secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX
artifact: /Serilog.*\.nupkg/
artifacts:
/Serilog.*\.nupkg/
/Serilog.*\.snupkg/
tag: v$(appveyor_build_version)
on:
branch: master
11 changes: 9 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/bin/bash

set -e

export PATH=$HOME/.dotnetcli:$PATH

dotnet --info
dotnet --list-sdks
dotnet restore

echo "🤖 Attempting to build..."
for path in src/**/*.csproj; do
dotnet build -f netstandard1.0 -c Release ${path}
dotnet build -f netstandard1.3 -c Release ${path}
dotnet build -f netstandard2.0 -c Release ${path}
done

echo "🤖 Running tests..."
for path in test/*.Tests/*.csproj; do
dotnet test -f netcoreapp2.0 -c Release ${path}
dotnet test -f netcoreapp2.2 -c Release ${path}
done

for path in test/*.PerformanceTests/*.PerformanceTests.csproj; do
dotnet build -f netcoreapp2.0 -c Release ${path}
dotnet build -f netcoreapp2.2 -c Release ${path}
done
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.1.4"
"version": "2.2.300"
}
}
7 changes: 7 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

sudo apt-get update && sudo apt-get install -y --no-install-recommends jq

RequiredDotnetVersion=$(jq -r '.sdk.version' global.json)

curl https://dot.net/v1/dotnet-install.sh -sSf | bash -s -- --install-dir $HOME/.dotnetcli --no-path --version $RequiredDotnetVersion
4 changes: 2 additions & 2 deletions src/Serilog/Capturing/DepthLimiter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DepthLimiter : ILogEventPropertyValueFactory
{
[ThreadStatic]
static int _currentDepth;

readonly int _maximumDestructuringDepth;
readonly PropertyValueConverter _propertyValueConverter;

Expand All @@ -37,7 +37,7 @@ public DepthLimiter(int maximumDepth, PropertyValueConverter propertyValueConver
_propertyValueConverter = propertyValueConverter;
}

public void SetCurrentDepth(int depth)
public static void SetCurrentDepth(int depth)
{
_currentDepth = depth;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Serilog/Capturing/GetablePropertyFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal static IEnumerable<PropertyInfo> GetPropertiesRecursive(this Type type)
}

var baseType = currentTypeInfo.BaseType;
if(baseType == null)
if (baseType == null)
{
yield break;
}
Expand Down
8 changes: 6 additions & 2 deletions src/Serilog/Capturing/MessageTemplateProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System.Collections.Generic;
using Serilog.Core;
using Serilog.Core.Pipeline;
using Serilog.Events;
Expand All @@ -32,7 +31,7 @@ public MessageTemplateProcessor(PropertyValueConverter propertyValueConverter)
_propertyBinder = new PropertyBinder(_propertyValueConverter);
}

public void Process(string messageTemplate, object[] messageTemplateParameters, out MessageTemplate parsedTemplate, out IEnumerable<LogEventProperty> properties)
public void Process(string messageTemplate, object[] messageTemplateParameters, out MessageTemplate parsedTemplate, out EventProperty[] properties)
{
parsedTemplate = _parser.Parse(messageTemplate);
properties = _propertyBinder.ConstructProperties(parsedTemplate, messageTemplateParameters);
Expand All @@ -42,5 +41,10 @@ public LogEventProperty CreateProperty(string name, object value, bool destructu
{
return _propertyValueConverter.CreateProperty(name, value, destructureObjects);
}

public LogEventPropertyValue CreatePropertyValue(object value, bool destructureObjects = false)
{
return _propertyValueConverter.CreatePropertyValue(value, destructureObjects);
}
}
}
Loading

0 comments on commit 655778f

Please sign in to comment.