Skip to content

Commit 114ac45

Browse files
committed
Cap the in-memory logger at 200MB
1 parent 279a200 commit 114ac45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Program.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class Program : BaseCommandModule
5757
public static Random rand = new();
5858
public static HasteBinClient hasteUploader;
5959

60-
public static StringWriter outputCapture = new();
60+
public static StringBuilder outputStringBuilder = new(16, 200000000);
61+
public static StringWriter outputCapture;
6162

6263
static public readonly HttpClient httpClient = new();
6364

@@ -75,6 +76,7 @@ public static void UpdateLists()
7576
static async Task Main(string[] _)
7677
{
7778
Console.OutputEncoding = Encoding.UTF8;
79+
outputCapture = new(outputStringBuilder);
7880

7981
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
8082
var logFormat = "[{Timestamp:yyyy-MM-dd HH:mm:ss zzz}] [{Level}] {Message}{NewLine}{Exception}";

0 commit comments

Comments
 (0)