forked from Imulion/MHFZ_Overlay
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add documentation for logging and testing
- Loading branch information
1 parent
86ed327
commit c06444b
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Structured Logging | ||
|
||
## Overview | ||
|
||
Our software uses structured logging to provide a clear and concise record of events and operations that occur during runtime. To facilitate structured logging, we use [NLog](https://github.com/NLog/NLog), a free logging platform for .NET with rich log routing and management capabilities. | ||
|
||
### Logging with NLog | ||
|
||
We have implemented a labeling system to categorize log messages into three main categories: | ||
|
||
- DATABASE OPERATION: Log messages related to database operations. | ||
- FILE OPERATION: Log messages related to I/O operations. | ||
- PROGRAM OPERATION: Log messages related to any other operations. | ||
|
||
All logs are saved to a file called `logs.log`, which is located in the same directory as the program. In the event of a crash, crash logs will be created with information about the crash, including the date and time, in the file name. | ||
|
||
### Goals | ||
|
||
The main goals of our structured logging implementation are to: | ||
|
||
- Provide clear and concise logs that facilitate debugging and issue resolution. | ||
- Categorize logs into relevant categories to help identify the source of issues. | ||
- Ensure logs are easily accessible and stored in a standardized format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Unit Tests | ||
|
||
## Overview | ||
|
||
We use unit testing to ensure that our software performs as expected and to identify and address any issues or bugs before release. To facilitate unit testing, we use [xUnit](https://github.com/xunit/xunit), a free, open-source, community-focused unit testing tool for .NET. | ||
|
||
### Goals | ||
|
||
Our primary goal for unit testing is to achieve a code coverage of 90% or above. We use SonarCloud's shields icons to display the percentage of code coverage. |