Skip to content

Commit 6f38efb

Browse files
committed
Fix batch formatting
1 parent d4f59ab commit 6f38efb

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

sample/Sample/Program.cs

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
using System.Threading;
44
using Serilog;
55
using Serilog.Core;
6+
using Serilog.Debugging;
7+
8+
SelfLog.Enable(Console.Error);
69

710
// By sharing between the Seq sink and logger itself,
811
// Seq API keys can be used to control the level of the whole logging pipeline.

src/Serilog.Sinks.Seq/Serilog.Sinks.Seq.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</PropertyGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="Serilog" Version="4.2.0-*" />
32+
<PackageReference Include="Serilog" Version="4.1.0" />
3333
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
3434
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
3535
</ItemGroup>

src/Serilog.Sinks.Seq/Sinks/Seq/SeqCompactJsonFormatter.cs

+11
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ public SeqCompactJsonFormatter(IFormatProvider? formatProvider = null, JsonValue
6161
/// <param name="logEvent">The event to format.</param>
6262
/// <param name="output">The output.</param>
6363
public void Format(LogEvent logEvent, TextWriter output)
64+
{
65+
FormatEvent(logEvent, output);
66+
output.WriteLine();
67+
}
68+
69+
/// <summary>
70+
/// Format the log event into the output, without newline delimiters.
71+
/// </summary>
72+
/// <param name="logEvent">The event to format.</param>
73+
/// <param name="output">The output.</param>
74+
public void FormatEvent(LogEvent logEvent, TextWriter output)
6475
{
6576
if (logEvent == null) throw new ArgumentNullException(nameof(logEvent));
6677
if (output == null) throw new ArgumentNullException(nameof(output));

0 commit comments

Comments
 (0)