Skip to content

5.0.0 Release #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 47 commits into from
Jun 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ab568af
Merge pull request #1 from serilog/dev
thiagosgarcia Apr 30, 2019
1596f80
File retention policy by date - Add configuration to discard files ol…
thiagosgarcia Apr 30, 2019
b213a7a
Refactoring file filter; fixing docs
thiagosgarcia Jun 1, 2019
f3abfb8
Merge pull request #1 from serilog/dev
EamonHetherton Aug 6, 2019
2d3cee7
update github sourcelink support package to latest version
maciejw Dec 6, 2019
a6f9324
Merge pull request #123 from maciejw/update-sourcelink
nblumhardt Dec 16, 2019
1093c3b
Major version bump; accepting breaking changes into dev
nblumhardt Feb 4, 2020
1b863ff
Remove explicit private modifier; name tweak; reorganize some conditi…
nblumhardt Feb 4, 2020
00e3e94
Merge branch 'dev' into dev
nblumhardt Feb 4, 2020
c2375eb
Fix test; update to use the 2019 build image
nblumhardt Feb 4, 2020
a015038
Merge branch 'thiagosgarcia-dev' into dev
nblumhardt Feb 4, 2020
73ac5ff
.NET Core App 3.0 target; misc clean-up
nblumhardt Feb 4, 2020
849ad79
Cut back frameworks targeted by tests to keep build manageable
nblumhardt Apr 13, 2020
74b09e8
Merge pull request #130 from nblumhardt/netcoreapp30
nblumhardt Apr 13, 2020
6df7cae
Added way to chain FileLifeCycleHooks together
EamonHetherton Apr 17, 2020
1af5096
stop using params when current implementation only ever has two values
EamonHetherton Apr 17, 2020
958bf02
Merge remote-tracking branch 'upstream/master' into dev
EamonHetherton Apr 17, 2020
76af134
Merge branch 'dev' of https://github.com/EamonHetherton/serilog-sinks…
EamonHetherton Apr 17, 2020
cad86bd
refactor "ChainTo" to instance method "Then"
EamonHetherton Apr 17, 2020
7106445
Merge pull request #141 from EamonHetherton/dev
nblumhardt Apr 20, 2020
5358051
docs: file lifecycle hooks
cocowalla Apr 29, 2020
865b9f2
Merge pull request #145 from serilog/docs/life-cycle-hooks
nblumhardt Apr 29, 2020
2be5531
fix: #146, file size limit
cocowalla May 15, 2020
e712ec2
Merge pull request #147 from serilog/fix/file-size-limit
cocowalla May 15, 2020
455c32c
Update NuGet.org publishing key
nblumhardt May 15, 2020
7938c90
Merge pull request #1 from serilog/dev
rafaelsc Jul 16, 2020
e44e591
Improve XML Docs
rafaelsc Jul 22, 2020
512587f
Merge pull request #167 from rafaelsc/feature/improveDocumentation
nblumhardt Jul 23, 2020
f155fab
Update project to use SPDX LicenseExpression (resolve warning NU5125:…
augustoproiete Nov 9, 2020
d8c6571
Add embedded icon to NuGet package (resolve warning NU5048: The 'Pack…
augustoproiete Nov 9, 2020
2f6f1b6
Merge pull request #190 from augustoproiete-forks/update-metadata-for…
nblumhardt Nov 9, 2020
4c8c3d4
Add ability to capture path of log file opened, via FileLifecycleHooks
augustoproiete Nov 9, 2020
7cf84eb
Merge pull request #189 from augustoproiete-forks/capture-log-file-pa…
nblumhardt Nov 10, 2020
bd4d7dd
Including the RollingFileSink initialization in the try..catch so tha…
pvandervelde Dec 1, 2020
771be4f
Merge pull request #196 from pvandervelde/fix-192
nblumhardt Jan 4, 2021
91cd684
Remove unnecessary dependencies
bdovaz Jun 11, 2021
6d437b2
Merge pull request #222 from bdovaz/remove-netstandard20-dependencies
nblumhardt Jun 11, 2021
d599eb6
Publishing key update
nblumhardt Jun 15, 2021
a1ba60e
Unpin the assembly version; fixes #135
nblumhardt Jun 22, 2021
6f43751
Remove matching test
nblumhardt Jun 22, 2021
be730d4
Merge pull request #227 from nblumhardt/unpin-assembly-version
nblumhardt Jun 22, 2021
08ff445
Add support C# 8 nullable reference types (#166)
rafaelsc Jun 22, 2021
edd4ba9
Add net5.0 target; use (source-only) Nullable package instead of bund…
nblumhardt Jun 22, 2021
a2fa447
Allow FileLifecycleHooks to change the length of the stream. Resolves…
augustoproiete Nov 4, 2020
7ca6143
Builds from `main`
nblumhardt Jun 22, 2021
3d63fa7
Publish from `main`
nblumhardt Jun 22, 2021
e64e9a9
Add PrivateAssets=All to Nullable dependency 😅
nblumhardt Jun 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if(Test-Path .\artifacts) {

$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"]
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "main" -and $revision -ne "local"]
$commitHash = $(git rev-parse --short HEAD)
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]

Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,19 @@ By default, the file sink will flush each event written through it to disk. To i

The [Serilog.Sinks.Async](https://github.com/serilog/serilog-sinks-async) package can be used to wrap the file sink and perform all disk access on a background worker thread.

### Extensibility
[`FileLifecycleHooks`](https://github.com/serilog/serilog-sinks-file/blob/master/src/Serilog.Sinks.File/Sinks/File/FileLifecycleHooks.cs) provide an extensibility point that allows hooking into different parts of the life cycle of a log file.

You can create a hook by extending from [`FileLifecycleHooks`](https://github.com/serilog/serilog-sinks-file/blob/master/src/Serilog.Sinks.File/Sinks/File/FileLifecycleHooks.cs) and overriding the `OnFileOpened` and/or `OnFileDeleting` methods.

- `OnFileOpened` provides access to the underlying stream that log events are written to, before Serilog begins writing events. You can use this to write your own data to the stream (for example, to write a header row), or to wrap the stream in another stream (for example, to add buffering, compression or encryption)

- `OnFileDeleting` provides a means to work with obsolete rolling log files, *before* they are deleted by Serilog's retention mechanism - for example, to archive log files to another location

Available hooks:

- [serilog-sinks-file-header](https://github.com/cocowalla/serilog-sinks-file-header): writes a header to the start of each log file
- [serilog-sinks-file-gzip](https://github.com/cocowalla/serilog-sinks-file-gzip): compresses logs as they are written, using streaming GZIP compression
- [serilog-sinks-file-archive](https://github.com/cocowalla/serilog-sinks-file-archive): archives obsolete rolling log files before they are deleted by Serilog's retention mechanism

_Copyright © 2016 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html)._
9 changes: 4 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
version: '{build}'
skip_tags: true
image:
- Visual Studio 2017
- Visual Studio 2019
- Ubuntu
configuration: Release
build_script:
- ps: ./Build.ps1
for:
Expand All @@ -19,14 +18,14 @@ artifacts:
deploy:
- provider: NuGet
api_key:
secure: N59tiJECUYpip6tEn0xvdmDAEiP9SIzyLEFLpwiigm/8WhJvBNs13QxzT1/3/JW/
secure: rbdBqxBpLt4MkB+mrDOYNDOd8aVZ1zMkysaVNAXNKnC41FYifzX3l9LM8DCrUWU5
skip_symbols: true
on:
branch: /^(master|dev)$/
branch: /^(main|dev)$/
- provider: GitHub
auth_token:
secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX
artifact: /Serilog.*\.nupkg/
tag: v$(appveyor_build_version)
on:
branch: master
branch: main
Binary file added assets/serilog-sink-nuget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 4 additions & 10 deletions example/Sample/Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net47</TargetFrameworks>
<TargetFrameworks>net48;net5.0</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AssemblyName>Sample</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Sample</PackageId>
Expand All @@ -12,13 +14,5 @@
<ProjectReference Include="..\..\src\Serilog.Sinks.File\Serilog.Sinks.File.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net47' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
</ItemGroup>

</Project>

1 change: 0 additions & 1 deletion serilog-sinks-file.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5
appveyor.yml = appveyor.yml
Build.ps1 = Build.ps1
build.sh = build.sh
NuGet.Config = NuGet.Config
README.md = README.md
assets\Serilog.snk = assets\Serilog.snk
EndProjectSection
Expand Down
3 changes: 3 additions & 0 deletions serilog-sinks-file.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Filenames/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Serilog/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Loading