Skip to content

Commit

Permalink
docs: prepare for v6.0.0 (#53)
Browse files Browse the repository at this point in the history
Prepare documentation and build scripts for release v6.0.0.
  • Loading branch information
FantasticFiasco authored Jul 8, 2019
1 parent 83d0dd0 commit 9329ae1
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 63 deletions.
8 changes: 7 additions & 1 deletion .vscode/spellright.dict
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
UDP
IPv4
IPv4
Serilog
formatters
localhost
multicast
formatter
JSON
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<VersionPrefix>6.0.0-beta2</VersionPrefix>
<VersionPrefix>6.0.0-beta4</VersionPrefix>
<Authors>Mattias Kindborg</Authors>
<Company />
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![Help](https://img.shields.io/badge/stackoverflow-serilog-orange.svg)](http://stackoverflow.com/questions/tagged/serilog)

__Package__ - [Serilog.Sinks.Udp](https://www.nuget.org/packages/serilog.sinks.udp)
| __Platforms__ - .NET 4.5, .NETStandard 1.3
| __Platforms__ - .NET Framework 4.5/4.6.1, .NET Standard 1.3/2.0

## Table of contents

Expand All @@ -30,11 +30,12 @@ In the following example, the sink will send UDP packages on the network to loca
```csharp
Serilog.ILogger log = new LoggerConfiguration()
.MinimumLevel.Verbose()
.WriteTo.Udp(IPAddress.Loopback, 7071)
.WriteTo.Udp("localhost", 7071, AddressFamily.InterNetwork)
.CreateLogger();
```

Used in conjunction with [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration) the same sink can be configured in the following way:
Used in conjunction with [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration) the same sink can be configured in the following way.

```json
{
"Serilog": {
Expand All @@ -43,22 +44,21 @@ Used in conjunction with [Serilog.Settings.Configuration](https://github.com/ser
{
"Name": "Udp",
"Args": {
"remoteAddress": "127.0.0.1",
"remotePort": 7071
"remoteAddress": "localhost",
"remotePort": 7071,
"family": "InterNetwork"
}
}
]
}
}
```

Configuration using [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration) enables the possibility to specify a hostname instead of an IP address as the remote address.

## Typical use case

Producing log events is only half the story. Unless you are consuming them in a matter that benefits you in development or production, there is really no need to produce them in the first place.

In development I've been sending UDP packages to the loopback address, and use [Log2Console](https://github.com/Statyk7/log2console) to visualize them. It supports UDP receivers, and allows me to filter and search according to my needs.
In development I've been sending UDP packages to the loopback address, and used [Log2Console](https://github.com/Statyk7/log2console) to visualize them. It supports UDP receivers, and allows me to filter and search according to my needs.

Taking it to the next level is when you as a team agree on sending the log events to a multicast address, making them accessible to all team members. This can be beneficial for Quality Assurance who wishes to monitor log events from all instances of your running application.

Expand Down Expand Up @@ -101,12 +101,6 @@ The following sample applications demonstrate the usage of this sink in various
- [Serilog.Sinks.Udp - Sample in .NET Core](https://github.com/FantasticFiasco/serilog-sinks-udp-sample-dotnet-core) - Sample application producing log events in .NET Core
- [Serilog.Sinks.Udp - Sample in .NET Framework](https://github.com/FantasticFiasco/serilog-sinks-udp-sample-dotnet-framework) - Sample application producing log events in .NET Framework

## Considerations

This sink is using sockets in [dual mode](https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.dualmode?view=netstandard-1.3), which tunnels IPv4 traffic over IPv6. This means that IPv6 is a prerequisite for using this sink. For questions regarding operating systems and IPv6 support, please see the [comparison of IPv6 support in operating systems](https://en.wikipedia.org/wiki/Comparison_of_IPv6_support_in_operating_systems).

For more information regarding sockets in dual mode, please see the [ASP.NET blog](https://blogs.msdn.microsoft.com/webdev/2013/01/08/dual-mode-sockets-never-create-an-ipv4-socket-again/).

## Install via NuGet

If you want to include the UDP sink in your project, you can [install it directly from NuGet](https://www.nuget.org/packages/Serilog.Sinks.UDP/).
Expand Down
53 changes: 21 additions & 32 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,31 @@
#---------------------------------#
# general configuration #
#---------------------------------#

# version format
version: '{build}'

#---------------------------------#
# environment configuration #
#---------------------------------#

# build worker image (VM template)
image: Visual Studio 2017

# environment variables
environment:
NUGET_API_KEY:
secure: JPQiQA6gg5Q9v4tHiognxQzw1nb0fNjLZzBLjB46MjVj0iw7NTl0/pw0yeStNsJI

#---------------------------------#
# build configuration #
#---------------------------------#
version: '{build}'

# build Configuration, i.e. Debug, Release, etc.
configuration: Release

# to run your custom scripts instead of automatic MSBuild
build_script:
- ps: ./build/build.ps1

#---------------------------------#
# tests configuration #
#---------------------------------#
- ps: ./build/build.ps1

test: off

#---------------------------------#
# artifacts configuration #
#---------------------------------#

artifacts:
- path: artifacts/Serilog.*.nupkg
- path: artifacts/Serilog.*.nupkg
name: NuGet

deploy:
- provider: GitHub
release: Release ${APPVEYOR_REPO_TAG_NAME}
description: TODO
auth_token:
secure: de2wnJZf6k7NY0XriDpf9BkrQ4MR5ZfDDWMM+H/K4OK3w0GpuJAMRj5PrO6tKu0K
artifact: /.*\.nupkg/
draft: true
on:
APPVEYOR_REPO_TAG: true
- provider: NuGet
api_key:
secure: JPQiQA6gg5Q9v4tHiognxQzw1nb0fNjLZzBLjB46MjVj0iw7NTl0/pw0yeStNsJI
skip_symbols: false
on:
APPVEYOR_REPO_TAG: true
15 changes: 0 additions & 15 deletions build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,4 @@ foreach ($test in Get-ChildItem test/*Tests)
Pop-Location
}

# Push
if ($tagged_build)
{
Write-Host "build: push package to www.nuget.org"

Push-Location .\artifacts

foreach ($package in Get-ChildItem *.nupkg -Exclude *.symbols.nupkg)
{
& dotnet nuget push $package --source "https://www.nuget.org/api/v2/package" --api-key "$env:NUGET_API_KEY"
}

Pop-Location
}

Pop-Location

0 comments on commit 9329ae1

Please sign in to comment.