Update version and enhance logging configuration
- Bump `EnvelopeGenerator.Web` version to `3.1.3`. - Improve logging setup in `Program.cs` with NLog and Trace level. - Modify `ServiceContainer` to accept `MSSQLServer` parameter. - Update `ModelContainer` to utilize new database service. - Add `warningLogs` section in `appsettings.json` for logging. - Streamline logging rules by consolidating level properties.
This commit is contained in:
parent
ea6d80918c
commit
171de98552
@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<PackageId>EnvelopeGenerator.Web</PackageId>
|
||||
<Version>3.1.2</Version>
|
||||
<Version>3.1.3</Version>
|
||||
<Authors>Digital Data GmbH</Authors>
|
||||
<Company>Digital Data GmbH</Company>
|
||||
<Product>EnvelopeGenerator.Web</Product>
|
||||
@ -13,8 +13,8 @@
|
||||
<PackageTags>digital data envelope generator web</PackageTags>
|
||||
<Description>EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly.</Description>
|
||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||
<AssemblyVersion>3.1.2</AssemblyVersion>
|
||||
<FileVersion>3.1.2</FileVersion>
|
||||
<AssemblyVersion>3.1.3</AssemblyVersion>
|
||||
<FileVersion>3.1.3</FileVersion>
|
||||
<Copyright>Copyright © 2025 Digital Data GmbH. All rights reserved.</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@ -24,6 +24,10 @@ try
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
|
||||
builder.Host.UseNLog();
|
||||
|
||||
var config = builder.Configuration;
|
||||
|
||||
var allowedOrigins = config.GetSection("AllowedOrigins").Get<string[]>() ??
|
||||
@ -41,9 +45,6 @@ try
|
||||
});
|
||||
});
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Host.UseNLog();
|
||||
|
||||
// Add base services
|
||||
builder.Services.AddScoped<DatabaseService>();
|
||||
|
||||
|
||||
@ -18,9 +18,9 @@ namespace EnvelopeGenerator.Web.Services
|
||||
public ActionService actionService;
|
||||
public EmailService emailService;
|
||||
|
||||
public ServiceContainer(State state)
|
||||
public ServiceContainer(State state, MSSQLServer MSSQL)
|
||||
{
|
||||
actionService = new(state);
|
||||
actionService = new(state, MSSQL);
|
||||
emailService = new(state);
|
||||
}
|
||||
}
|
||||
@ -82,7 +82,7 @@ namespace EnvelopeGenerator.Web.Services
|
||||
State.DbConfig = configModel.LoadConfiguration();
|
||||
|
||||
Models = new(State);
|
||||
Services = new(State);
|
||||
Services = new(State, MSSQL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -39,6 +39,11 @@
|
||||
"fileName": "${logDirectory}\\${logFileNamePrefix}-Info.log",
|
||||
"maxArchiveDays": 30
|
||||
},
|
||||
"warningLogs": {
|
||||
"type": "File",
|
||||
"fileName": "${logDirectory}\\${logFileNamePrefix}-Warning.log",
|
||||
"maxArchiveDays": 30
|
||||
},
|
||||
"errorLogs": {
|
||||
"type": "File",
|
||||
"fileName": "${logDirectory}\\${logFileNamePrefix}-Error.log",
|
||||
@ -50,14 +55,17 @@
|
||||
"maxArchiveDays": 30
|
||||
}
|
||||
},
|
||||
// Trace, Debug, Info, Warn, Error and *Fatal*
|
||||
"rules": [
|
||||
{
|
||||
"logger": "*",
|
||||
"minLevel": "Info",
|
||||
"maxLevel": "Warn",
|
||||
"level": "Info",
|
||||
"writeTo": "infoLogs"
|
||||
},
|
||||
{
|
||||
"logger": "*",
|
||||
"level": "Warn",
|
||||
"writeTo": "warningLogs"
|
||||
},
|
||||
{
|
||||
"logger": "*",
|
||||
"level": "Error",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user