feat: Add Serilog SQLite sink and Serilog.UI dashboard with centralized log directory configuration
- Add Serilog.Sinks.SQLite v7.0.0 for structured logging to SQLite database - Add Serilog.UI v3.2.0 and Serilog.UI.SqliteProvider v1.1.0 for web-based log viewer - Add Serilog.Settings.Configuration v10.0.1 for configuration support - Configure SQLite log storage at E:\LogFiles\Digital Data\ECMJobRunner.WebCron\logs.db - Add Serilog.UI dashboard at /serilog-ui endpoint - Centralize log directory configuration in appsettings.json (Logging:LogDirectory) - Configure Serilog programmatically with Console and SQLite sinks - Remove deprecated Serilog configuration from appsettings files (now using code-based config) - Enable Serilog self-diagnostics for troubleshooting - Both Serilog sink and Serilog.UI use same SQLite database path from configuration
This commit is contained in:
@@ -1,22 +1,10 @@
|
||||
{
|
||||
"Serilog": {
|
||||
"Using": [ "Serilog.Sinks.Console" ],
|
||||
"MinimumLevel": {
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"Override": {
|
||||
"Microsoft.AspNetCore": "Warning",
|
||||
"Microsoft.EntityFrameworkCore": "Warning",
|
||||
"Hangfire": "Information"
|
||||
}
|
||||
},
|
||||
"WriteTo": [
|
||||
{
|
||||
"Name": "Console",
|
||||
"Args": {
|
||||
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
|
||||
"Microsoft.AspNetCore": "Warning",
|
||||
"Microsoft.EntityFrameworkCore": "Warning",
|
||||
"Hangfire": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user