This commit is contained in:
EonaCat committed 2026-06-16 09:55:05 +02:00
1 parent aba8b4df46
commit f99e17e838
4 files changed
+1387 -1349

No files matched your search

@@ -16,6 +16,11 @@ namespace EonaCat.LogStack.Test.Web
{
public static async Task Main(string[] args)
{
await using var logger = LogBuilder.CreateDefault("MyApp");
logger.Information("Application started");
logger.Warning("Low memory warning");
logger.Error(new Exception("DIT IS MIJN TEST!"), "Unexpected error occurred");
// Configure the client
var centralOptions = new LogCentralOptions
@@ -46,6 +51,9 @@ namespace EonaCat.LogStack.Test.Web
var logBuilder = new LogBuilder();
logBuilder.WithTimestampMode(TimestampMode.Local);
logBuilder.WriteToConsole();
logBuilder.WriteToFile("./logs", outputFormat: FileOutputFormat.Csv);
logBuilder.WriteToFile("./logs", outputFormat: FileOutputFormat.StructuredJson);
logBuilder.WriteToFile("./logs", outputFormat: FileOutputFormat.Text);
logBuilder.WriteToFile("./logs", outputFormat: FileOutputFormat.Json);
logBuilder.WriteToFile("./logs", outputFormat: FileOutputFormat.Xml);
logBuilder.WriteToTcp("127.0.0.1", 514);