Initial version

This commit is contained in:
2026-04-06 08:15:54 +02:00
parent 97b08ad6c8
commit 8db1a6a556
231 changed files with 96983 additions and 63 deletions

34
ConsoleApp1/Program.cs Normal file
View File

@@ -0,0 +1,34 @@
using EonaCat.LogStack.Configuration;
using EonaCat.LogStack.Core;
// This file is part of the EonaCat project(s) which is released under the Apache License.
// See the LICENSE file or go to https://EonaCat.com/License for full license details.
var logger = new LogBuilder("MyApp")
.WithMinimumLevel(LogLevel.Information)
.WriteToConsole()
.WriteToFile("C:\\tesss", maxFileSize: 50 * 1024 * 1024)
//.WriteToJsonFile("./logs", maxFileSize: 50 * 1024 * 1024)
//.WriteToHttp("https://127.0.0.1")
//.WriteToUdp("127.0.0.1", 514)
//.WriteToTcp("127.0.0.1", 514)
//.WriteToDatabase(null)
//.WriteToDiscord("https://discord.com/api/webhooks/...")
//.WriteToMicrosoftTeams("https://outlook.office.com/webhook/...")
//.WriteToElasticSearch("http://localhost:9200/logs")
//.WriteToGraylogFlow(null)
//.WriteToZabbixFlow(null)
.BoostWithCorrelationId()
.BoostWithProcessId()
.Build();
while (true)
{
logger.Information("Application started");
logger.Error(new Exception("Nerd!"), "Something went wrong");
await Task.Delay(1);
}
await logger.DisposeAsync(); // Flushes all logs