2025-04-02 16:53:35 +05:30

100 lines
3.3 KiB
JSON

{
"Serilog": {
"Using": [
"Serilog.Sinks.Console",
"Serilog.Sinks.MongoDB",
"Serilog.Sinks.Async"
],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Warning",
"Microsoft.AspNetCore.Mvc.Infrastructure": "Warning",
//"Serilog.AspNetCore.RequestLoggingMiddleware": "Warning"
}
},
"WriteTo": [
{
"Name": "Async",
"Args": {
"configure": [
{
"Name": "MongoDB",
"Args": {
"databaseUrl": "mongodb://localhost:27017/DotNetLogs",
//"databaseUrl": "mongodb://devuser:xxxxx@147.93.98.152:27017/MarcoPMS?authSource=admin",
"collectionName": "application_logs",
"batchPostingLimit": 50,
"cappedMaxSizeMb": "1024",
"cappedMaxDocuments": "1000",
"rollingInterval": "Day"
//"outputTemplate": "[{Timestamp:yyyy/MM/dd HH:mm} {Level:u3}] {SourceContext}:{NewLine} {Message:lj}{Exception}{NewLine}"
}
},
{
"Name": "File",
"Args": {
"path": "logs/myapp-.log",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] {Message:lj}{NewLine}{Exception}",
"fileSizeLimitBytes": 1073741824, // 1 GB
"retainedFileCountLimit": 100, // Retain 100 files
"buffered": true, // use async logging
"flushToDiskInterval": "00:00:30" // flush every 30 seconds
}
},
{
"Name": "Console",
"Args": {
"outputTemplate": "[{Timestamp:yyyy/MM/dd HH:mm} {Level:u3}] {SourceContext}:{NewLine} {Message:lj}{NewLine}{Properties:j}{Exception}{NewLine}"
}
}
]
}
}
],
"Enrich": [
"FromLogContext",
"WithMachineName",
"WithThreadId"
]
},
"ConnectionStrings": {
// "DefaultConnectionString": "Server=103.50.160.45;User ID=marcowvh_admin;Password=Marcoemp@123;Database=marcowvh_empattendanceci",
"DefaultConnectionString": "Server=localhost;port=3306;User ID=root;Password=root;Database=MarcoBMS2",
//"DefaultConnectionString": "Server=147.93.98.152;User ID=devuser;Password=AppUser@123$;Database=MarcoBMS1"
},
"AppSettings": {
"WebFrontendUrl": "http://localhost:5173",
"ImagesBaseUrl": "http://localhost:5173"
},
"AllowedHosts": "*",
"Jwt": {
"Issuer": "http://localhost:5246",
"Audience": "http://localhost:5246",
"Key": "sworffishhkjfa9dnfdndfu33infnajfj",
"ExpiresInMinutes": 60,
"RefreshTokenExpiresInDays": 7
},
"SmtpSettings": {
"Server": "mail.marcobms.com",
"Port": 465, //587,
"SenderName": "Marco",
"SenderEmail": "vikas@marcobms.com",
"Username": "vikas@marcobms.com",
"Password": "MarcoVikas@123",
"EnableSsl": true
},
"EmailSettings": {
"SmtpServer": "smtp.gmail.com",
"Port": 587,
"SenderName": "MarcoIoIT",
"SenderEmail": "marcoioitsoft@gmail.com",
"Password": "qrtq wfuj hwpp fhqr"
}
}