Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 Directory.Version.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<VersionPrefix>9.0.0</VersionPrefix>
<VersionPrefix>9.1.0</VersionPrefix>
</PropertyGroup>
</Project>
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Serilog sink that writes events to the [Seq](https://datalust.co/seq) structured log server. Supports all modern .NET platforms.

[<img alt="Package Logo" src="https://datalust.co/images/seq-nuget.png" width="128px">](https://nuget.org/packages/serilog.sinks.seq)
[<img alt="Package Logo" src="https://datalust.co/assets/images-2021-10-Seq_Diamond-Main.png" width="128px">](https://nuget.org/packages/serilog.sinks.seq)

> [!TIP]
> If you would like to see timing and dependency information in Seq, [SerilogTracing](https://github.com/serilog-tracing/serilog-tracing) is a Serilog extension that can send both logs and traces through this sink.
Expand All @@ -12,8 +12,8 @@ A Serilog sink that writes events to the [Seq](https://datalust.co/seq) structur

Install _Serilog.Sinks.Seq_ into your .NET project:

```powershell
> dotnet add package Serilog.Sinks.Seq
```sh
dotnet add package Serilog.Sinks.Seq
```

Point the logger to Seq:
Expand All @@ -37,7 +37,7 @@ Then query log event properties like `ContactId` from the browser:
When the application shuts down, [ensure any buffered events are propertly flushed to Seq](https://merbla.com/2016/07/06/serilog-log-closeandflush/) by disposing the logger or calling `Log.CloseAndFlush()`:

```csharp
Log.CloseAndFlush();
await Log.CloseAndFlushAsync();
```

The sink can take advantage of Seq's [API keys](https://docs.datalust.co/docs/api-keys) to authenticate clients and dynamically attach properties to events at the server-side. To use an API key, specify it in the `apiKey` parameter of `WriteTo.Seq()`.
Expand Down Expand Up @@ -72,7 +72,7 @@ Serilog's XML configuration has several other capabilities that are described on

To use the Seq sink with _Microsoft.Extensions.Configuration_, for example with ASP.NET Core or .NET Core, use the [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration) package. First install that package if you have not already done so:

```powershell
```sh
dotnet add package Serilog.Settings.Configuration
```

Expand All @@ -83,7 +83,7 @@ var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();

var logger = new LoggerConfiguration()
await using var logger = new LoggerConfiguration()
.ReadFrom.Configuration(configuration)
.CreateLogger();
```
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "10.0.0",
"allowPrerelease": false,
"rollForward": "latestFeature"
}
Expand Down
12 changes: 8 additions & 4 deletions src/Serilog.Sinks.Seq/Serilog.Sinks.Seq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>A Serilog sink that writes events to Seq using newline-delimited JSON and HTTP/HTTPS.</Description>
<Authors>Serilog Contributors;Serilog.Sinks.Seq Contributors;Datalust Pty Ltd</Authors>
<Copyright>Copyright © Serilog Contributors, Serilog.Sinks.Seq Contributors, Datalust Pty Ltd.</Copyright>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net10.0</TargetFrameworks>
<RootNamespace>Serilog</RootNamespace>
<PackageTags>serilog;seq</PackageTags>
<PackageIcon>icon.png</PackageIcon>
Expand All @@ -14,19 +14,23 @@
<RepositoryType>git</RepositoryType>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<DefineConstants>$(DefineConstants);WRITE_ALL_BYTES_ASYNC;ASYNC_DISPOSE;SOCKETS_HTTP_HANDLER_ALWAYS_DEFAULT;ARCHITECTURE_WASM</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<DefineConstants>$(DefineConstants);WRITE_ALL_BYTES_ASYNC;ASYNC_DISPOSE;SOCKETS_HTTP_HANDLER_ALWAYS_DEFAULT;ARCHITECTURE_WASM</DefineConstants>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Serilog.Sinks.Seq.Tests" PublicKey="0024000004800000940000000602000000240000525341310004000001000100fb8d13fd344a1c6fe0fe83ef33c1080bf30690765bc6eb0df26ebfdf8f21670c64265b30db09f73a0dea5b3db4c9d18dbf6d5a25af5ce9016f281014d79dc3b4201ac646c451830fc7e61a2dfd633d34c39f87b81894191652df5ac63cc40c77f3542f702bda692e6e8a9158353df189007a49da0f3cfd55eb250066b19485ec" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog" Version="4.3.1" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 7 additions & 11 deletions test/Serilog.Sinks.Seq.Tests/Serilog.Sinks.Seq.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net4.8;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net4.8;net8.0;net9.0;net10.0</TargetFrameworks>
<AssemblyName>Serilog.Sinks.Seq.Tests</AssemblyName>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<DefineConstants>$(DefineConstants);ASYNC_DISPOSE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Content Include="Resources\ThreeBufferedEvents.clef.txt">
Expand All @@ -24,19 +20,19 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="Serilog.Sinks.TextWriter" Version="2.1.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="Serilog.Sinks.TextWriter" Version="3.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net4.8' ">
<PackageReference Include="System.Threading.Channels" Version="10.0.8" />
<Reference Include="System.Net.Http" />
<PackageReference Include="System.Threading.Channels" Version="8.0.0" />
</ItemGroup>

</Project>
Loading