Skip to content

Commit

Permalink
Adjust settings to log out to text files, console and sentry (disable…
Browse files Browse the repository at this point in the history
…d by default in dev)
  • Loading branch information
carlsixsmith-moj committed Aug 8, 2024
1 parent d6f6d68 commit db2fd4d
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 85 deletions.
11 changes: 0 additions & 11 deletions .vscode/launch.json
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
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

0 comments on commit db2fd4d

Please sign in to comment.