"MinimumLevel": { "Default": "Information" }

This commit is contained in:
Sedat ÖZTÜRK 2026-06-19 14:49:58 +03:00
parent aea724a887
commit 41c7d862dc
6 changed files with 19 additions and 29 deletions

View file

@ -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..!");
}
}

View file

@ -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();

View file

@ -57,7 +57,7 @@ public class Program
};
var loggerConfig = new LoggerConfiguration()
.MinimumLevel.Error()
.ReadFrom.Configuration(configuration)
.WriteTo.Console(); // Konsola da log yaz
switch (DefaultDatabaseProvider)

View file

@ -34,7 +34,12 @@
},
"Serilog": {
"MinimumLevel": {
"Default": "Information"
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Volo.Abp": "Warning",
"Sozsoft": "Information"
}
}
}
}

View file

@ -38,7 +38,12 @@
},
"Serilog": {
"MinimumLevel": {
"Default": "Information"
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Volo.Abp": "Warning",
"Sozsoft": "Information"
}
}
}
}

View file

@ -34,7 +34,12 @@
},
"Serilog": {
"MinimumLevel": {
"Default": "Information"
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Volo.Abp": "Warning",
"Sozsoft": "Information"
}
}
}
}