Skip to content

Commit 82f4bbd

Browse files
authored
Merge pull request #97 from TechnologyEnhancedLearning/refactor-logging
Refactor logging
2 parents 50d9915 + bb4f26b commit 82f4bbd

File tree

27 files changed

+167
-164
lines changed

27 files changed

+167
-164
lines changed

.github/workflows/workflow-readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ The individual steps also automatically pass so can see if any error at the end
8383
- for tests use the run-tests-and-report-with-env-values.ps1 file
8484

8585
## Versioning
86-
86+
Via semantic release and recorded as a generate c# file used by a blazor component

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,31 @@ CHANGELOG.md
208208
/.runsettings
209209
/nuget.config
210210
/nuget.config
211+
212+
213+
AllTestResults/*
214+
!AllTestResults/gitinclude.txt
215+
216+
CICDPackageLocation/*
217+
!CICDPackageLocation/gitinclude.txt
218+
219+
CoverageReport/*
220+
!CoverageReport/gitinclude.txt
221+
222+
docs/css/*
223+
!docs/css/gitinclude.txt
224+
225+
TELBlazor.Components.ShowCase.E2ETests/Reports/*
226+
!TELBlazor.Components.ShowCase.E2ETests/Reports/gitinclude.txt
227+
228+
TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/Logs/*
229+
!TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/Logs/gitinclude.txt
230+
231+
**/wwwroot/css/*
232+
!**/wwwroot/css/app.css
233+
234+
/tools/
235+
**/wwwroot/TELBlazorPackageVersion.txt
236+
237+
# Generated version info files
238+
TELBlazor.Components/TELBlazorPackageVersion/VersionInfo*.cs

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@
5858
<PackageVersion Include="Microsoft.Playwright.Xunit" Version="1.50.0" />
5959
<PackageVersion Include="Verify.Playwright" Version="3.0.0" />
6060
<!-- Internal packages -->
61-
<PackageVersion Include="TELBlazor.Components" Version="$(TELBlazorPackageVersion)" />
61+
<PackageVersion Include="TELBlazor.Components" Version="$(TELBlazorPackageVersion)" IncludePrerelease="true"/>
6262
</ItemGroup>
6363
</Project>

PackageSettings.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050

5151
<!--Building the components project makes the package publish isnt needed-->
5252
<DisablePackageGeneration>$(DISABLE_PACKAGE_GENERATION)</DisablePackageGeneration>
53-
53+
54+
<!--So updates prerelease versions-->
55+
<RestorePrerelease>true</RestorePrerelease>
5456
</PropertyGroup>
5557

5658
</Project>

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ It is recommended you check setup by reading this section and making sure packag
173173
- **packagesettings.props** sets thresholds
174174
- running at solution level **./run-tests-and-report-with-env-values.ps1** (see in the file for specific arguments you may want to set)
175175
- will produce a test coverage site **[your repo folder]/TELBlazor/CoverageReport/index.html**
176-
176+
- then look at CoverageReport in solution root and you can bookmark index.html to see your coverage
177+
- E2E project has a Reports folder for tracings
178+
- Similarly run-tests-and-report-using-local-props.ps1 runs just using your local props file
179+
- appsettings.Development can be set in the E2E Host to log to the Logs folder at project route, see template
177180

178181

179182
#### Tips
@@ -186,7 +189,7 @@ It is recommended you check setup by reading this section and making sure packag
186189
```
187190
npm install -g @commitlint/cli @commitlint/config-angular
188191
```
189-
- You can put into your pre-push, pre-commit hook, or into the gitguardian hooks some logic like the below.
192+
- You can put into your pre-push, pre-commit hook, commit-ms, or into the gitguardian hooks some logic like the below.
190193
```
191194
#### --- Commitlint Logic (force local config) ---
192195
REPO_ROOT=$(git rev-parse --show-toplevel)
@@ -270,6 +273,7 @@ It is recommended you check setup by reading this section and making sure packag
270273
- if still not working delete **bin** and **obj**
271274
- if still not working, restart Visual Studio
272275
- if there are still issues its easier to problem solve by using a random very high **TELBlazor.Components** package version number and ensuring it fails and says it found the source but not the version
276+
273277
#### Git commit names
274278
- git commit names can be caught locally
275279
- if they are not

TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost.Client/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
.CreateLogger();
5050

5151
// Add Serilog to logging providers
52-
builder.Logging.AddSerilog(Log.Logger, dispose: true);//qqqq may not need dispose for client
52+
builder.Logging.AddSerilog(Log.Logger);
5353

5454
//for really bad fails
5555
try

TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost.Client/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost.Client.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
<ItemGroup>
3737
<ProjectReference Include="..\..\TELBlazor.Components.ShowCase.Shared\TELBlazor.Components.ShowCase.Shared.csproj" />
38-
<ProjectReference Include="..\..\TELBlazor.Components\TELBlazor.Components.csproj" />
3938
</ItemGroup>
4039

4140
<ItemGroup>

TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost.Client/packages.lock.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@
4040
},
4141
"Microsoft.NET.ILLink.Tasks": {
4242
"type": "Direct",
43-
"requested": "[8.0.18, )",
44-
"resolved": "8.0.18",
45-
"contentHash": "OiXqr2YIBEV9dsAWEtasK470ALyJ0VxJ9k4MotOxlWV6HeEgrJKYMW4HHj1OCCXvqE0/A25wEKPkpfiBARgDZA=="
43+
"requested": "[8.0.19, )",
44+
"resolved": "8.0.19",
45+
"contentHash": "IhHf+zeZiaE5EXRyxILd4qM+Hj9cxV3sa8MpzZgeEhpvaG3a1VEGF6UCaPFLO44Kua3JkLKluE0SWVamS50PlA=="
4646
},
4747
"Microsoft.NET.Sdk.WebAssembly.Pack": {
4848
"type": "Direct",
49-
"requested": "[8.0.18, )",
50-
"resolved": "8.0.18",
51-
"contentHash": "SoVkRwFwnaX39J1uaI72PTilSJ6OoonIG+2VMpazEaAA9t+aJt2Caf49q76SYv3x9iU8hu1axlMWSkR9rt8nIg=="
49+
"requested": "[8.0.19, )",
50+
"resolved": "8.0.19",
51+
"contentHash": "Cm/sq4ET7XGU7jBSfSh+s+eV0faJ1RnErpImRYN7+d5loWISBwl22qsM6sn9StUWKJao+xGvF0IxgyPVnY20Vw=="
5252
},
5353
"Serilog": {
5454
"type": "Direct",
@@ -321,7 +321,7 @@
321321
"Markdig": "[0.41.3, )",
322322
"Microsoft.AspNetCore.Components.Web": "[8.0.14, )",
323323
"Serilog": "[4.2.0, )",
324-
"TELBlazor.Components": "[1.9.3-local, )"
324+
"TELBlazor.Components": "[1.2.6-local, )"
325325
}
326326
},
327327
"Markdig": {

TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/Logs/log-development2-20250513.txt

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

0 commit comments

Comments
 (0)