Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust settings to log out to text files, console and sentry #122

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .vscode/launch.json
samgibsonmoj marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@
"/Views": "${workspaceFolder}/src/Server.UI/Views"
}
},
{
"name": "Launch Build Console App",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build (Build Project)",
"program": "${workspaceFolder}/build/bin/Debug/net8.0/Build.dll",
"args": [],
"cwd": "${workspaceFolder}/build",
"stopAtEntry": false,
"console": "internalConsole"
},
{
"name": ".net Core Attach",
"type": "coreclr",
Expand Down
14 changes: 0 additions & 14 deletions .vscode/tasks.json
samgibsonmoj marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@
"kind": "build",
"isDefault": true
}
},
{
"label": "Build (Build Project)",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/build/Build.csproj"
],
"problemMatcher": "$msCompile",
"group":{
"kind": "build",
"isDefault": true
}
}
]
}
12 changes: 0 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
services:
seq:
image: datalust/seq
container_name: seq
environment:
ACCEPT_EULA: "Y"
ports:
- "5341:80"
volumes:
- seq_data:/data

sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: sqlserver
Expand All @@ -22,7 +12,5 @@ services:
- sqlserver_data:/var/opt/mssql

volumes:
seq_data:
driver: local
sqlserver_data:
driver: local
1 change: 0 additions & 1 deletion src/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<PackageReference Include="Serilog" Version="4.0.1"/>
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2"/>
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="8.0.0"/>
<PackageReference Include="ZiggyCreatures.FusionCache" Version="1.2.0"/>
<PackageReference Include="Hmpps.Cfo.Matching.Core" Version="1.0.0" />
</ItemGroup>
Expand Down
28 changes: 0 additions & 28 deletions src/Server.UI/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,5 @@
"AllowedIPs": [
"::1"
]
},
"Serilog": {
"Using": ["Serilog.Sinks.Console", "Sentry.Serilog"],
"MinimumLevel": {
"Default": "Debug",
"Override": {
"Microsoft": "Information",
"System": "Information"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"restrictedToMinimumLevel": "Debug"
}
},
{
"Name": "Seq",
"Args": {
"serverUrl": "http://localhost:5341"
}
}
],
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
"Properties": {
"Application": "CATS"
}
}
}
59 changes: 40 additions & 19 deletions src/Server.UI/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,51 @@
}
},
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Sentry.Serilog" ],
"Using": [
"Serilog.Sinks.Console",
"Sentry.Serilog"
],
"MinimumLevel": {
"Default": "Information",
"Default": "Debug",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
"Microsoft": "Information",
"System": "Information",
"MudBlazor": "Information",
"ActualLab": "Information"
}
},
"WriteTo": [
{
"Name": "Console"
}//,
//{
// "Name": "Sentry",
// "Args": {
// "dsn": "your-sentry-dsn",
// "minimumBreadcrumbLevel": "Information",
// "minimumEventLevel": "Error",
// "sendDefaultPii": true
// }
//}
]
},
{
"Name": "File",
"Args": {
"path": "../../logs/log-.txt",
"rollingInterval": "Day",
"restrictedToMinimumLevel": "Debug"
}
},
{
"Name": "Sentry",
"Args": {
"dsn": "",
"minimumBreadcrumbLevel": "Information",
"minimumEventLevel": "Error",
"sendDefaultPii": true,
"Release": "1.0.1-dev",
"Environment": "Development"
}
}
],
"Enrich": [
"FromLogContext",
"WithMachineName",
"WithThreadId"
],
"Properties": {
"Application": "CATS"
}
},
"IdentitySettings": {
"RequireDigit": true,
Expand All @@ -52,9 +75,7 @@
"EmailTemplate": ""
},
"AllowlistOptions": {
"AllowedIPs": [

]
"AllowedIPs": []
},
"DMS": {
"ApplicationUrl": "",
Expand All @@ -65,7 +86,7 @@
"AccessKey": "",
"SecretKey": "",
"Bucket": "",
"RootFolder": ""
"RootFolder": ""
},
"AppConfigurationSettings": {
"BehindSSLProxy": false,
Expand Down
Loading