Skip to content

Commit

Permalink
Fix batch formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nblumhardt committed Dec 2, 2024
1 parent d4f59ab commit 6f38efb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions sample/Sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
using System.Threading;
using Serilog;
using Serilog.Core;
using Serilog.Debugging;

SelfLog.Enable(Console.Error);

// By sharing between the Seq sink and logger itself,
// Seq API keys can be used to control the level of the whole logging pipeline.
Expand Down
2 changes: 1 addition & 1 deletion src/Serilog.Sinks.Seq/Serilog.Sinks.Seq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="4.2.0-*" />
<PackageReference Include="Serilog" Version="4.1.0" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
</ItemGroup>
Expand Down
11 changes: 11 additions & 0 deletions src/Serilog.Sinks.Seq/Sinks/Seq/SeqCompactJsonFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ public SeqCompactJsonFormatter(IFormatProvider? formatProvider = null, JsonValue
/// <param name="logEvent">The event to format.</param>
/// <param name="output">The output.</param>
public void Format(LogEvent logEvent, TextWriter output)
{
FormatEvent(logEvent, output);
output.WriteLine();
}

/// <summary>
/// Format the log event into the output, without newline delimiters.
/// </summary>
/// <param name="logEvent">The event to format.</param>
/// <param name="output">The output.</param>
public void FormatEvent(LogEvent logEvent, TextWriter output)
{
if (logEvent == null) throw new ArgumentNullException(nameof(logEvent));
if (output == null) throw new ArgumentNullException(nameof(output));
Expand Down

0 comments on commit 6f38efb

Please sign in to comment.