diff --git a/SysML2.NET.Viewer/Program.cs b/SysML2.NET.Viewer/Program.cs
index 67603a2d2..cef377503 100644
--- a/SysML2.NET.Viewer/Program.cs
+++ b/SysML2.NET.Viewer/Program.cs
@@ -35,8 +35,7 @@ namespace SysML2.NET.Viewer
using Radzen;
- using Serilog;
- using Serilog.Events;
+ using Serilog;
using SySML2.NET.REST;
using SysML2.NET.Serializer.Json;
@@ -55,18 +54,16 @@ public static class Program
///
/// an awaitable
///
- public static async Task Main(string[] args)
- {
- Log.Logger = new LoggerConfiguration()
- .MinimumLevel.Debug()
- .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
- .Enrich.FromLogContext()
- .WriteTo.BrowserConsole()
- .CreateLogger();
-
- var builder = WebAssemblyHostBuilder.CreateDefault(args);
- builder.Services.AddLogging(loggingBuilder =>
- loggingBuilder.AddSerilog(dispose: true));
+ public static async Task Main(string[] args)
+ {
+ var builder = WebAssemblyHostBuilder.CreateDefault(args);
+
+ Log.Logger = new LoggerConfiguration()
+ .ReadFrom.Configuration(builder.Configuration)
+ .CreateLogger();
+
+ builder.Services.AddLogging(loggingBuilder =>
+ loggingBuilder.AddSerilog(dispose: true));
builder.RootComponents.Add("#app");
builder.RootComponents.Add("head::after");
diff --git a/SysML2.NET.Viewer/SysML2.NET.Viewer.csproj b/SysML2.NET.Viewer/SysML2.NET.Viewer.csproj
index 2cf6b3538..d4cb214b4 100644
--- a/SysML2.NET.Viewer/SysML2.NET.Viewer.csproj
+++ b/SysML2.NET.Viewer/SysML2.NET.Viewer.csproj
@@ -23,10 +23,16 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/SysML2.NET.Viewer/wwwroot/appsettings.json b/SysML2.NET.Viewer/wwwroot/appsettings.json
new file mode 100644
index 000000000..a36e13a36
--- /dev/null
+++ b/SysML2.NET.Viewer/wwwroot/appsettings.json
@@ -0,0 +1,37 @@
+{
+ "Serilog": {
+ "Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File", "Serilog.Sinks.Async" ],
+ "MinimumLevel": {
+ "Default": "Information",
+ "Override": {
+ "Microsoft": "Warning",
+ "System": "Warning"
+ }
+ },
+ "WriteTo": [
+ {
+ "Name": "Console"
+ },
+ {
+ "Name": "Async",
+ "Args": {
+ "configure": [
+ {
+ "Name": "File",
+ "Args": {
+ "path": "logs/log-reqifviewer-.txt",
+ "rollingInterval": "Day",
+ "rollOnFileSizeLimit": true
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ],
+ "Properties": {
+ "Application": "dmap-cdao",
+ "Environment": "Production"
+ }
+ }
+}