Skip to content

Commit b0fb6a7

Browse files
committed
seq working.
1 parent e4aed2c commit b0fb6a7

File tree

14 files changed

+1194
-181
lines changed

14 files changed

+1194
-181
lines changed

.tye/process_store

Lines changed: 0 additions & 6 deletions
This file was deleted.

apps/Tasky.IdentityServer/Logs/logs.txt

Lines changed: 1010 additions & 0 deletions
Large diffs are not rendered by default.

apps/Tasky.IdentityServer/Program.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,17 @@
55
using Microsoft.Extensions.Hosting;
66
using Serilog;
77
using Serilog.Events;
8+
using Tasky.Shared.Hosting;
89

910
namespace Tasky;
1011

1112
public class Program
1213
{
1314
public async static Task<int> Main(string[] args)
1415
{
15-
Log.Logger = new LoggerConfiguration()
16-
#if DEBUG
17-
.MinimumLevel.Debug()
18-
#else
19-
.MinimumLevel.Information()
20-
#endif
21-
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
22-
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
23-
.Enrich.FromLogContext()
24-
.WriteTo.Async(c => c.File("Logs/logs.txt"))
25-
#if DEBUG
26-
.WriteTo.Async(c => c.Console())
27-
#endif
28-
.CreateLogger();
16+
var assemblyName = typeof(Program).Assembly.GetName().Name;
17+
18+
SerilogConfigurationHelper.Configure(assemblyName);
2919

3020
try
3121
{

apps/Tasky.IdentityServer/appsettings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,10 @@
2626
"ClientName": "Tasky_AuthServer",
2727
"ExchangeName": "Tasky"
2828
}
29-
}
29+
},
30+
"Serilog": {
31+
"WriteTo": [
32+
{ "Name": "Seq", "Args": { "serverUrl": "http://localhost:5341" } }
33+
]
34+
}
3035
}

services/administration/host/Tasky.AdministrationService.HttpApi.Host/Program.cs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,17 @@
44
using Microsoft.Extensions.DependencyInjection;
55
using Microsoft.Extensions.Hosting;
66
using Serilog;
7-
using Serilog.Events;
7+
using Tasky.Shared.Hosting;
88

99
namespace Tasky.AdministrationService;
1010

1111
public class Program
1212
{
1313
public async static Task<int> Main(string[] args)
1414
{
15-
Log.Logger = new LoggerConfiguration()
16-
#if DEBUG
17-
.MinimumLevel.Debug()
18-
#else
19-
.MinimumLevel.Information()
20-
#endif
21-
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
22-
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
23-
.Enrich.FromLogContext()
24-
.WriteTo.Async(c => c.File("Logs/logs.txt"))
25-
#if DEBUG
26-
.WriteTo.Async(c => c.Console())
27-
#endif
28-
.CreateLogger();
15+
var assemblyName = typeof(Program).Assembly.GetName().Name;
16+
17+
SerilogConfigurationHelper.Configure(assemblyName);
2918

3019
try
3120
{
Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
{
2-
"App": {
3-
"CorsOrigins": "https://*.AdministrationService.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
4-
},
5-
"ConnectionStrings": {
6-
"IdentityService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyIdentityService;Pooling=false;",
7-
"AdministrationService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyAdministrationService;Pooling=false;",
8-
"SaaSService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskySaaSService;Pooling=false;"
9-
},
10-
"Redis": {
11-
"Configuration": "127.0.0.1"
12-
},
13-
"AuthServer": {
14-
"Authority": "https://localhost:7000/",
15-
"RequireHttpsMetadata": "false",
16-
"SwaggerClientId": "AdministrationService_Swagger",
17-
"SwaggerClientSecret": "1q2w3e*"
18-
},
19-
"RabbitMQ": {
20-
"Connections": {
21-
"Default": {
22-
"HostName": "localhost"
23-
}
2+
"App": {
3+
"CorsOrigins": "https://*.AdministrationService.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
244
},
25-
"EventBus": {
26-
"ClientName": "Tasky_Administration",
27-
"ExchangeName": "Tasky"
5+
"ConnectionStrings": {
6+
"IdentityService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyIdentityService;Pooling=false;",
7+
"AdministrationService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyAdministrationService;Pooling=false;",
8+
"SaaSService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskySaaSService;Pooling=false;"
9+
},
10+
"Redis": {
11+
"Configuration": "127.0.0.1"
12+
},
13+
"AuthServer": {
14+
"Authority": "https://localhost:7000/",
15+
"RequireHttpsMetadata": "false",
16+
"SwaggerClientId": "AdministrationService_Swagger",
17+
"SwaggerClientSecret": "1q2w3e*"
18+
},
19+
"RabbitMQ": {
20+
"Connections": {
21+
"Default": {
22+
"HostName": "localhost"
23+
}
24+
},
25+
"EventBus": {
26+
"ClientName": "Tasky_Administration",
27+
"ExchangeName": "Tasky"
28+
}
29+
},
30+
"Serilog": {
31+
"WriteTo": [
32+
{ "Name": "Seq", "Args": { "serverUrl": "http://localhost:5341" } }
33+
]
2834
}
29-
}
3035
}

services/identity/host/Tasky.IdentityService.HttpApi.Host/Program.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,17 @@
55
using Microsoft.Extensions.Hosting;
66
using Serilog;
77
using Serilog.Events;
8+
using Tasky.Shared.Hosting;
89

910
namespace Tasky.IdentityService;
1011

1112
public class Program
1213
{
1314
public async static Task<int> Main(string[] args)
1415
{
15-
Log.Logger = new LoggerConfiguration()
16-
#if DEBUG
17-
.MinimumLevel.Debug()
18-
#else
19-
.MinimumLevel.Information()
20-
#endif
21-
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
22-
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
23-
.Enrich.FromLogContext()
24-
.WriteTo.Async(c => c.File("Logs/logs.txt"))
25-
#if DEBUG
26-
.WriteTo.Async(c => c.Console())
27-
#endif
28-
.CreateLogger();
16+
var assemblyName = typeof(Program).Assembly.GetName().Name;
17+
18+
SerilogConfigurationHelper.Configure(assemblyName);
2919

3020
try
3121
{
Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
{
2-
"App": {
3-
"CorsOrigins": "https://*.IdentityService.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
4-
},
5-
"ConnectionStrings": {
6-
"AdministrationService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyAdministrationService;Pooling=false;",
7-
"SaaSService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskySaaSService;Pooling=false;",
8-
"IdentityService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyIdentityService;Pooling=false;"
9-
},
10-
"Redis": {
11-
"Configuration": "127.0.0.1"
12-
},
13-
"AuthServer": {
14-
"Authority": "https://localhost:7000/",
15-
"RequireHttpsMetadata": "false",
16-
"SwaggerClientId": "IdentityService_Swagger",
17-
"SwaggerClientSecret": "1q2w3e*"
18-
},
19-
"RabbitMQ": {
20-
"Connections": {
21-
"Default": {
22-
"HostName": "localhost"
23-
}
2+
"App": {
3+
"CorsOrigins": "https://*.IdentityService.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
244
},
25-
"EventBus": {
26-
"ClientName": "Tasky_Identity",
27-
"ExchangeName": "Tasky"
5+
"ConnectionStrings": {
6+
"AdministrationService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyAdministrationService;Pooling=false;",
7+
"SaaSService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskySaaSService;Pooling=false;",
8+
"IdentityService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyIdentityService;Pooling=false;"
9+
},
10+
"Redis": {
11+
"Configuration": "127.0.0.1"
12+
},
13+
"AuthServer": {
14+
"Authority": "https://localhost:7000/",
15+
"RequireHttpsMetadata": "false",
16+
"SwaggerClientId": "IdentityService_Swagger",
17+
"SwaggerClientSecret": "1q2w3e*"
18+
},
19+
"RabbitMQ": {
20+
"Connections": {
21+
"Default": {
22+
"HostName": "localhost"
23+
}
24+
},
25+
"EventBus": {
26+
"ClientName": "Tasky_Identity",
27+
"ExchangeName": "Tasky"
28+
}
29+
},
30+
"Serilog": {
31+
"WriteTo": [
32+
{ "Name": "Seq", "Args": { "serverUrl": "http://localhost:5341" } }
33+
]
2834
}
29-
}
3035
}

services/project/host/Tasky.ProjectService.HttpApi.Host/Program.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,17 @@
55
using Microsoft.Extensions.Hosting;
66
using Serilog;
77
using Serilog.Events;
8+
using Tasky.Shared.Hosting;
89

910
namespace Tasky.ProjectService;
1011

1112
public class Program
1213
{
1314
public async static Task<int> Main(string[] args)
1415
{
15-
Log.Logger = new LoggerConfiguration()
16-
#if DEBUG
17-
.MinimumLevel.Debug()
18-
#else
19-
.MinimumLevel.Information()
20-
#endif
21-
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
22-
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
23-
.Enrich.FromLogContext()
24-
.WriteTo.Async(c => c.File("Logs/logs.txt"))
25-
#if DEBUG
26-
.WriteTo.Async(c => c.Console())
27-
#endif
28-
.CreateLogger();
16+
var assemblyName = typeof(Program).Assembly.GetName().Name;
17+
18+
SerilogConfigurationHelper.Configure(assemblyName);
2919

3020
try
3121
{
Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
{
2-
"App": {
3-
"CorsOrigins": "https://*.ProjectService.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
4-
},
5-
"ConnectionStrings": {
6-
"ProjectService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyProjectService;Pooling=false;",
7-
"SaaSService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskySaaSService;Pooling=false;",
8-
"AdministrationService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyAdministrationService;Pooling=false;"
9-
},
10-
"Redis": {
11-
"Configuration": "127.0.0.1"
12-
},
13-
"AuthServer": {
14-
"Authority": "https://localhost:7000/",
15-
"RequireHttpsMetadata": "false",
16-
"SwaggerClientId": "ProjectService_Swagger",
17-
"SwaggerClientSecret": "1q2w3e*"
18-
},
19-
"RabbitMQ": {
20-
"Connections": {
21-
"Default": {
22-
"HostName": "localhost"
23-
}
2+
"App": {
3+
"CorsOrigins": "https://*.ProjectService.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
244
},
25-
"EventBus": {
26-
"ClientName": "Tasky_ProjectService",
27-
"ExchangeName": "Tasky"
5+
"ConnectionStrings": {
6+
"ProjectService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyProjectService;Pooling=false;",
7+
"SaaSService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskySaaSService;Pooling=false;",
8+
"AdministrationService": "User ID=postgres;Password=postgres;Host=localhost;Port=5432;Database=TaskyAdministrationService;Pooling=false;"
9+
},
10+
"Redis": {
11+
"Configuration": "127.0.0.1"
12+
},
13+
"AuthServer": {
14+
"Authority": "https://localhost:7000/",
15+
"RequireHttpsMetadata": "false",
16+
"SwaggerClientId": "ProjectService_Swagger",
17+
"SwaggerClientSecret": "1q2w3e*"
18+
},
19+
"RabbitMQ": {
20+
"Connections": {
21+
"Default": {
22+
"HostName": "localhost"
23+
}
24+
},
25+
"EventBus": {
26+
"ClientName": "Tasky_ProjectService",
27+
"ExchangeName": "Tasky"
28+
}
29+
},
30+
"Serilog": {
31+
"WriteTo": [
32+
{ "Name": "Seq", "Args": { "serverUrl": "http://localhost:5341" } }
33+
]
2834
}
29-
}
3035
}

0 commit comments

Comments
 (0)