diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9872aba..8ae6f31 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -124,6 +124,14 @@ jobs:
"Microsoft.AspNetCore" = "Warning"
}
}
+ Seq = @{
+ ServerUrl = "https://log.azaaxin.com"
+ ApiKey = "KEY"
+ MinimumLevel = "Trace"
+ LevelOverride = @{
+ Microsoft: "Warning"
+ }
+ }
ApiConfiguration = @{
EspConfiguration = @{
InformationBoardImageUrl = "http://server_ip:port/home/default.jpg"
@@ -178,6 +186,14 @@ jobs:
"Microsoft.AspNetCore" = "Warning"
}
}
+ Seq = @{
+ ServerUrl = ${{ vars.SEQ_URL }}
+ ApiKey = ${{ secrets.seq_api_key }}
+ MinimumLevel = "Trace"
+ LevelOverride = @{
+ Microsoft: "Warning"
+ }
+ }
ApiConfiguration = @{
EspConfiguration = @{
InformationBoardImageUrl = "${{ vars.ESP_IMAGE_URL }}"
diff --git a/HomeApi/HomeApi.csproj b/HomeApi/HomeApi.csproj
index 23610eb..170408b 100644
--- a/HomeApi/HomeApi.csproj
+++ b/HomeApi/HomeApi.csproj
@@ -17,6 +17,7 @@
+
@@ -30,5 +31,8 @@
Always
+
+ Always
+
diff --git a/HomeApi/Program.cs b/HomeApi/Program.cs
index 5482fb1..e8dfd07 100644
--- a/HomeApi/Program.cs
+++ b/HomeApi/Program.cs
@@ -1,8 +1,12 @@
using HomeApi.Registration;
using Scalar.AspNetCore;
+using Serilog;
var builder = WebApplication.CreateBuilder(args);
-
+builder.Services.AddLogging(loggingBuilder =>
+{
+ loggingBuilder.AddSeq(builder.Configuration.GetSection("Seq"));
+});
builder.Services.AddHttpClient();
builder.Services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
builder.Services.AddControllers();
@@ -22,4 +26,4 @@ app.UseAuthorization();
app.MapControllers();
-app.Run();
\ No newline at end of file
+app.Run();
diff --git a/HomeApi/appsettings.Development.json b/HomeApi/appsettings.Development.json
index c288e85..b70be38 100644
--- a/HomeApi/appsettings.Development.json
+++ b/HomeApi/appsettings.Development.json
@@ -12,6 +12,14 @@
"Microsoft.AspNetCore": "Warning"
}
},
+ "Seq": {
+ "ServerUrl": "https://log.azaaxin.com",
+ "ApiKey": "KEY",
+ "MinimumLevel": "Trace",
+ "LevelOverride": {
+ "Microsoft": "Warning"
+ }
+ },
"ApiConfiguration": {
"EspConfiguration": {
"InformationBoardImageUrl": "http://192.168.101.178:5000/home/default.jpg",
diff --git a/HomeApi/appsettings.json b/HomeApi/appsettings.json
index c288e85..b70be38 100644
--- a/HomeApi/appsettings.json
+++ b/HomeApi/appsettings.json
@@ -12,6 +12,14 @@
"Microsoft.AspNetCore": "Warning"
}
},
+ "Seq": {
+ "ServerUrl": "https://log.azaaxin.com",
+ "ApiKey": "KEY",
+ "MinimumLevel": "Trace",
+ "LevelOverride": {
+ "Microsoft": "Warning"
+ }
+ },
"ApiConfiguration": {
"EspConfiguration": {
"InformationBoardImageUrl": "http://192.168.101.178:5000/home/default.jpg",