Skip to content

Commit dd80bc6

Browse files
authored
Merge pull request #13 from serilog/dev
1.1.0 Release
2 parents 6539943 + 7b399b8 commit dd80bc6

18 files changed

+142
-267
lines changed

Build.ps1

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,24 @@ if(Test-Path .\artifacts) {
1212
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
1313
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
1414
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
15+
$commitHash = $(git rev-parse --short HEAD)
16+
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]
1517

16-
echo "build: Version suffix is $suffix"
18+
echo "build: Package version suffix is $suffix"
19+
echo "build: Build version suffix is $buildSuffix"
1720

1821
foreach ($src in ls src/*) {
1922
Push-Location $src
2023

2124
echo "build: Packaging project in $src"
2225

23-
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
26+
& dotnet build -c Release --version-suffix=$buildSuffix
27+
& dotnet pack -c Release --include-symbols -o ..\..\artifacts --version-suffix=$suffix --no-build
2428
if($LASTEXITCODE -ne 0) { exit 1 }
2529

2630
Pop-Location
2731
}
2832

29-
foreach ($test in ls test/*.PerformanceTests) {
30-
Push-Location $test
31-
32-
echo "build: Building performance test project in $test"
33-
34-
& dotnet build -c Release
35-
if($LASTEXITCODE -ne 0) { exit 2 }
36-
37-
Pop-Location
38-
}
39-
4033
foreach ($test in ls test/*.Tests) {
4134
Push-Location $test
4235

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ You can get started quickly with this package, and later migrate to the full Ser
1313

1414
### Getting started
1515

16-
**1.** Add [the NuGet package](https://nuget.org/packages/serilog.extensions.logging.file) to the `"dependencies"` section of your `project.json` file:
16+
**1.** Add [the NuGet package](https://nuget.org/packages/serilog.extensions.logging.file) as a dependency of your project either with the package manager or directly to the CSPROJ file:
1717

18-
```json
19-
"dependencies": {
20-
"Serilog.Extensions.Logging.File": "1.0.0"
21-
}
18+
```xml
19+
<PackageReference Include="Serilog.Extensions.Logging.File" Version="1.1.0" />
2220
```
2321

2422
**2.** In your `Startup` class's `Configure()` method, call `AddFile()` on the provided `loggerFactory`.

appveyor.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
version: '{build}'
22
skip_tags: true
3-
image: Visual Studio 2015
3+
image: Visual Studio 2017
44
configuration: Release
5-
install:
6-
- ps: mkdir -Force ".\build\" | Out-Null
7-
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1"
8-
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
9-
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121'
10-
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
5+
test: off
116
build_script:
127
- ps: ./Build.ps1
13-
test: off
148
artifacts:
159
- path: artifacts/Serilog.*.nupkg
1610
deploy:

example/WebApplication/Logs/another-20161018.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2017-06-30T09:38:55.6849437+10:00 0HL5V900UR4A8 [INF] Request starting HTTP/1.1 DEBUG http://localhost:58951/ 0 (e5be5b71)
2+
2017-06-30T09:38:55.6849437+10:00 0HL5V900UR4A9 [INF] Request starting HTTP/1.1 GET http://localhost:58951/ (e5be5b71)
3+
2017-06-30T09:38:55.8539458+10:00 0HL5V900UR4A8 [INF] Request finished in 184.2573ms 200 (15c52c40)
4+
2017-06-30T09:38:56.3379450+10:00 0HL5V900UR4A9 [INF] Executing action method "WebApplication.Controllers.HomeController.Index (WebApplication)" with arguments (null) - ModelState is Valid (ba7f4ac2)
5+
2017-06-30T09:38:56.3499453+10:00 0HL5V900UR4A9 [INF] Hello, world! (f83bcf75)
6+
2017-06-30T09:38:58.9934553+10:00 0HL5V900UR4A9 [INF] Executing ViewResult, running view at path "/Views/Home/Index.cshtml". (9707eebe)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp1.0</TargetFramework>
5+
<PreserveCompilationContext>true</PreserveCompilationContext>
6+
<AssemblyName>WebApplication</AssemblyName>
7+
<OutputType>Exe</OutputType>
8+
<PackageId>WebApplication</PackageId>
9+
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
10+
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<None Update="wwwroot\**\*;Views\**\*;Areas\**\Views">
15+
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
16+
</None>
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<ProjectReference Include="..\..\src\Serilog.Extensions.Logging.File\Serilog.Extensions.Logging.File.csproj" />
21+
</ItemGroup>
22+
23+
<ItemGroup>
24+
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.2" />
25+
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.3" />
26+
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.2" />
27+
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.3" />
28+
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.2" />
29+
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.0.2" />
30+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
31+
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
32+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.2" />
33+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.2" />
34+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.0.2" />
35+
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.0.1" />
36+
</ItemGroup>
37+
38+
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
39+
<Exec Command="bower install" />
40+
<Exec Command="dotnet bundle" />
41+
</Target>
42+
43+
<ItemGroup>
44+
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.2.301" />
45+
</ItemGroup>
46+
47+
</Project>

example/WebApplication/WebApplication.xproj

Lines changed: 0 additions & 23 deletions
This file was deleted.

example/WebApplication/project.json

Lines changed: 0 additions & 68 deletions
This file was deleted.

global.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

serilog-extensions-logging-file.sln

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.14
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0069BFD6-B0EE-4204-A85F-F75E31A77B3C}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{B0D573D8-1AE2-4C5C-817A-95815067452E}"
99
ProjectSection(SolutionItems) = preProject
1010
appveyor.yml = appveyor.yml
1111
Build.ps1 = Build.ps1
12-
global.json = global.json
1312
LICENSE = LICENSE
1413
README.md = README.md
1514
EndProjectSection
@@ -18,11 +17,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{D54DE844-A
1817
EndProject
1918
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "example", "example", "{1C72E771-7C72-4A30-A408-5CE66E792ADF}"
2019
EndProject
21-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApplication", "example\WebApplication\WebApplication.xproj", "{FC44EC1F-AD83-4522-99B4-4B309B8CC78A}"
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApplication", "example\WebApplication\WebApplication.csproj", "{FC44EC1F-AD83-4522-99B4-4B309B8CC78A}"
2221
EndProject
23-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Extensions.Logging.File", "src\Serilog.Extensions.Logging.File\Serilog.Extensions.Logging.File.xproj", "{E640A22A-DF3C-40A2-AC72-DEB2F9B16241}"
22+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Extensions.Logging.File", "src\Serilog.Extensions.Logging.File\Serilog.Extensions.Logging.File.csproj", "{E640A22A-DF3C-40A2-AC72-DEB2F9B16241}"
2423
EndProject
25-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Extensions.Logging.File.Tests", "test\Serilog.Extensions.Logging.File.Tests\Serilog.Extensions.Logging.File.Tests.xproj", "{64A3F2C5-D71E-44A6-8DC7-99474765B32E}"
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Extensions.Logging.File.Tests", "test\Serilog.Extensions.Logging.File.Tests\Serilog.Extensions.Logging.File.Tests.csproj", "{64A3F2C5-D71E-44A6-8DC7-99474765B32E}"
2625
EndProject
2726
Global
2827
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/Serilog.Extensions.Logging.File/Microsoft/Extensions/Logging/FileLoggerExtensions.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ public static ILoggerFactory AddFile(
117117
(ITextFormatter)new RenderedCompactJsonFormatter() :
118118
new MessageTemplateTextFormatter("{Timestamp:o} {RequestId,13} [{Level:u3}] {Message} ({EventId:x8}){NewLine}{Exception}", null);
119119

120-
#if SHARING
121-
const bool sharingSupported = true;
122-
#else
123-
const bool sharingSupported = false;
124-
#endif
125-
126120
var configuration = new LoggerConfiguration()
127121
.MinimumLevel.Is(Conversions.MicrosoftToSerilogLevel(minimumLevel))
128122
.Enrich.FromLogContext()
@@ -131,7 +125,7 @@ public static ILoggerFactory AddFile(
131125
Environment.ExpandEnvironmentVariables(pathFormat),
132126
fileSizeLimitBytes: fileSizeLimitBytes,
133127
retainedFileCountLimit: retainedFileCountLimit,
134-
shared: sharingSupported,
128+
shared: true,
135129
flushToDiskInterval: TimeSpan.FromSeconds(2)));
136130

137131
if (!isJson)

src/Serilog.Extensions.Logging.File/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Description>Add file logging to ASP.NET Core apps with one line of code.</Description>
5+
<AssemblyVersion>1.0.0</AssemblyVersion>
6+
<VersionPrefix>1.1.0</VersionPrefix>
7+
<Authors>Serilog Contributors</Authors>
8+
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
9+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
10+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
11+
<AssemblyName>Serilog.Extensions.Logging.File</AssemblyName>
12+
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
13+
<SignAssembly>true</SignAssembly>
14+
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
15+
<PackageId>Serilog.Extensions.Logging.File</PackageId>
16+
<PackageTags>asp.net;core;logging;file</PackageTags>
17+
<PackageIconUrl>http://serilog.net/images/serilog-extension-nuget.png</PackageIconUrl>
18+
<PackageProjectUrl>https://github.com/serilog/serilog-extensions-logging-file</PackageProjectUrl>
19+
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
20+
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
21+
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
22+
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Serilog" Version="2.5.0" />
27+
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
28+
<PackageReference Include="Serilog.Formatting.Compact" Version="1.0.0" />
29+
<PackageReference Include="Serilog.Extensions.Logging" Version="1.4.0" />
30+
<PackageReference Include="Serilog.Sinks.Async" Version="1.1.0" />
31+
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="1.0.2" />
32+
</ItemGroup>
33+
34+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
35+
<Reference Include="System" />
36+
<Reference Include="Microsoft.CSharp" />
37+
</ItemGroup>
38+
39+
</Project>

src/Serilog.Extensions.Logging.File/Serilog.Extensions.Logging.File.xproj

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)