From 41c7d862dcd16d24fcffd187e6292b141e7f821d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Fri, 19 Jun 2026 14:49:58 +0300 Subject: [PATCH] "MinimumLevel": { "Default": "Information" } --- .../Sozsoft.MailQueue/Domain/MailQueueWorker.cs | 15 --------------- .../DatabaseMigrationEventHandlerBase.cs | 10 ---------- api/src/Sozsoft.Platform.HttpApi.Host/Program.cs | 2 +- .../appsettings.Dev.json | 7 ++++++- .../appsettings.Production.json | 7 ++++++- .../appsettings.json | 7 ++++++- 6 files changed, 19 insertions(+), 29 deletions(-) diff --git a/api/modules/Sozsoft.MailQueue/Domain/MailQueueWorker.cs b/api/modules/Sozsoft.MailQueue/Domain/MailQueueWorker.cs index 0a374f6..e5dc690 100644 --- a/api/modules/Sozsoft.MailQueue/Domain/MailQueueWorker.cs +++ b/api/modules/Sozsoft.MailQueue/Domain/MailQueueWorker.cs @@ -114,13 +114,9 @@ public class MailQueueWorker : BackgroundWorkerBase using var uow2 = uowManager.Begin(requiresNew: true, isTransactional: false); try { - //LogManager.LogInformation("Kuyruk process başladı", "KUYRUK", "KUYRUK", kuyruk.Id, jobId); - // Tablo oluştur var tables = await TableGenerator.GenerateAsync(queue.TableName, queue.TableParameter, queue.Id); - //LogManager.LogInformation($"{tables.Count} adet tablo oluşturuldu", "TABLO", "KUYRUK", kuyruk.Id, jobId); - // Mail Body oluştur var mailBody = await MailBodyGenerator.GenerateAsync( TemplateName, @@ -129,8 +125,6 @@ public class MailQueueWorker : BackgroundWorkerBase tables, jobId); - //LogManager.LogInformation($"Mail Body oluşturuldu", "MAILBODY", "KUYRUK", kuyruk.Id, jobId); - // Attachment oluştur // Iki attachment türü var: // 1- ATTACHMENT alanı dolu olanlar @@ -142,8 +136,6 @@ public class MailQueueWorker : BackgroundWorkerBase continue; } - //LogManager.LogInformation($"{attachments.Count} adet attachment oluşturuldu", "ATTACHMENT", "KUYRUK", kuyruk.Id, jobId); - // 2- Tablo (IN olmayanlar-PDF,XLS,TXT) var attachmentsTable = await AttachmentGenerator.GenerateAsync(tables.Values.ToList(), queue.Id, jobId); // IN olmayan herhangi bir tablo belirtilmisse fakat bu tablo attachment olarak uretilememisse, hata vardir @@ -154,8 +146,6 @@ public class MailQueueWorker : BackgroundWorkerBase continue; } - //LogManager.LogInformation($"{attachmentsTable.Count} adet attachment-tablo oluşturuldu", "ATTACHMENT-TABLO", "KUYRUK", kuyruk.Id, jobId); - foreach (var attachmentTable in attachmentsTable) { var key = attachmentTable.Key; @@ -166,7 +156,6 @@ public class MailQueueWorker : BackgroundWorkerBase attachments.Add(key, attachmentTable.Value); } - //LogManager.LogInformation($"Mail hazırlandı. Gönderim yapılıyor", "MAILSEND", "KUYRUK", kuyruk.Id, jobId); // Gönderimi yap var senderKeyValue = queue.From.Split(":"); @@ -184,7 +173,6 @@ public class MailQueueWorker : BackgroundWorkerBase if (result.Success) { - //LogManager.LogInformation($"Mail gönderildi. {result.MessageId}", "MAILSEND", "KUYRUK", kuyruk.Id, jobId); queue.AwsMessageId = result.MessageId; } else @@ -219,9 +207,6 @@ public class MailQueueWorker : BackgroundWorkerBase await uow.SaveChangesAsync(cancellationToken); - - //LogManager.LogInformation($"Template process bitti. {kuyruklar.Count} adet kuyruk kaydı işlendi", "TEMPLATE", "TEMPLATE", templateId, jobId); - //Logger.LogInformation("Executed MailWorker..!"); } } diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/DatabaseMigrationEventHandlerBase.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/DatabaseMigrationEventHandlerBase.cs index 906de09..d0591bd 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/DatabaseMigrationEventHandlerBase.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/DatabaseMigrationEventHandlerBase.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sozsoft.Platform.EntityFrameworkCore; -using Sozsoft.Platform.Extensions; using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; @@ -167,15 +166,6 @@ public class DatabaseMigrationEventHandler : { result = true; } - //var cs = tenantConfiguration.FindDefaultConnectionString(); - //var dcs = tenantConfiguration.FindConnectionString(DatabaseName); - //if (!cs.IsNullOrWhiteSpace() || !dcs.IsNullOrWhiteSpace()) - //{ - // //Migrating the tenant database (only if tenant has a separate database) - // Logger.LogInformation( - // $"Migrating separate database of tenant. Database Name = {DatabaseName}, TenantId = {tenantId}"); - // result = await MigrateDatabaseSchemaWithDbContextAsync(); - //} } await uow.CompleteAsync(); diff --git a/api/src/Sozsoft.Platform.HttpApi.Host/Program.cs b/api/src/Sozsoft.Platform.HttpApi.Host/Program.cs index a2dc9fe..f631fa6 100644 --- a/api/src/Sozsoft.Platform.HttpApi.Host/Program.cs +++ b/api/src/Sozsoft.Platform.HttpApi.Host/Program.cs @@ -57,7 +57,7 @@ public class Program }; var loggerConfig = new LoggerConfiguration() - .MinimumLevel.Error() + .ReadFrom.Configuration(configuration) .WriteTo.Console(); // Konsola da log yaz switch (DefaultDatabaseProvider) diff --git a/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.Dev.json b/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.Dev.json index f0c28d6..4bb7f0b 100644 --- a/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.Dev.json +++ b/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.Dev.json @@ -34,7 +34,12 @@ }, "Serilog": { "MinimumLevel": { - "Default": "Information" + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "Volo.Abp": "Warning", + "Sozsoft": "Information" + } } } } diff --git a/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.Production.json b/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.Production.json index 8930c7d..87ebdc4 100644 --- a/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.Production.json +++ b/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.Production.json @@ -38,7 +38,12 @@ }, "Serilog": { "MinimumLevel": { - "Default": "Information" + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "Volo.Abp": "Warning", + "Sozsoft": "Information" + } } } } diff --git a/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.json b/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.json index 45482d2..5f556c5 100644 --- a/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.json +++ b/api/src/Sozsoft.Platform.HttpApi.Host/appsettings.json @@ -34,7 +34,12 @@ }, "Serilog": { "MinimumLevel": { - "Default": "Information" + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "Volo.Abp": "Warning", + "Sozsoft": "Information" + } } } }