Skip to content

Commit

Permalink
Merge pull request #1819 from pkuehnel/feat/increaseInMemorySinkData
Browse files Browse the repository at this point in the history
feat(InMemorySink): increase in memory log capacity
  • Loading branch information
pkuehnel authored Feb 8, 2025
2 parents f4d96c6 + 09a2741 commit ea40b5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PkSoftwareService.Custom.Backend/InMemorySink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class InMemorySink : ILogEventSink
/// <param name="outputTemplate">The output template (should match your Console sink).</param>
/// <param name="formatProvider">Optional format provider.</param>
/// <param name="capacity">Max number of messages to store.</param>
public InMemorySink(string outputTemplate, IFormatProvider? formatProvider = null, int capacity = 10000)
public InMemorySink(string outputTemplate, IFormatProvider? formatProvider = null, int capacity = 20000)
{
_capacity = capacity;
_logMessages = new Queue<string>(capacity);
Expand Down
2 changes: 1 addition & 1 deletion TeslaSolarCharger/Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
builder.Host.UseSerilog();
const string outputTemplate = "[{Timestamp:dd-MMM-yyyy HH:mm:ss.fff} {Level:u3} {SourceContext}] {Message:lj}{NewLine}{Exception}";
var inMemoryLevelSwitch = new LoggingLevelSwitch(LogEventLevel.Verbose);
var inMemorySink = new InMemorySink(outputTemplate);
var inMemorySink = new InMemorySink(outputTemplate, capacity: 20000);

builder.Services.AddSingleton(inMemoryLevelSwitch);
builder.Services.AddSingleton(inMemorySink);
Expand Down

0 comments on commit ea40b5e

Please sign in to comment.