Skip to content

Commit 18fa726

Browse files
committed
Logs: Fixed sharing violation error when writing to the log file.
1 parent a06c558 commit 18fa726

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# Changelog
22

3+
## 1.3.1
4+
5+
### Fixed
6+
- Logs: Fixed sharing violation error when writing to the log file.
7+
38
## 1.3.0
49

510
### Added
6-
711
- Can now provide an email to receive a link to the report and updates on the report status.
812

913
### Changed
10-
1114
- Using the new draf submission flow.
1215

1316
## 1.2.0
1417

1518
### Added
16-
1719
- Three toggles to allow the user to choose which data to include in the bug report (screenshot, video, and log file).
1820

1921
## 1.1.0
2022

2123
### Improvements
22-
2324
- Bug Reporter Canvas Prefab: Changed scaling mode to `ScaleWithScreenSize` to make it more responsive on different screen sizes.
2425
- Video Recording: Pausing the recording when the bug submission form is visible, resuming when it's not.
2526
- UI: Added close button to the bug submission form.

Runtime/Scripts/Logger.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ private void WriteToLog(string log)
3737
{
3838
try
3939
{
40-
using (StreamWriter writer = File.AppendText(_logPath))
40+
using (var fileStream = new FileStream(_logPath, FileMode.Append, FileAccess.Write, FileShare.ReadWrite))
4141
{
42-
writer.WriteLine(log);
42+
using (var writer = new StreamWriter(fileStream))
43+
{
44+
writer.WriteLine(log);
45+
}
4346
}
4447
}
4548
catch (Exception e)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.betahub.bugreporter",
3-
"version": "1.0.0",
3+
"version": "1.3.1",
44
"displayName": "BetaHub Bug Reporter",
55
"description": "A tool for recording gameplay videos and submitting bug reports directly to BetaHub.",
66
"unity": "2022.3",

0 commit comments

Comments
 (0)