Skip to content

Commit e9a0f4d

Browse files
committed
🐛 fix journal file logging
semver: patch
1 parent 8554427 commit e9a0f4d

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

Console/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
var api = new EliteDangerousApi();
44

5-
api.Start();
6-
75
api.OnAll(e =>
86
{
97
Console.WriteLine($"Event: {e.Event}");
@@ -14,6 +12,8 @@
1412
Console.WriteLine($"New journal file being watched: {e.FullName}");
1513
});
1614

15+
api.Start();
16+
1717
// api.OnAllJson(e =>
1818
// {
1919
// Console.WriteLine($"JSON Event: {e.eventName}");

EliteAPI/EliteDangerousApi.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ public void Start()
6161
SafeInvoke.Invoke(handler, file);
6262
});
6363
_statusWatchers.ForEach(w => w.OnContentChanged(Invoke));
64-
65-
64+
6665
_statusWatchers.ForEach(w => w.StartWatching());
6766
_journalWatcher.StartWatching();
6867
}

EliteAPI/Watcher/FileWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class FileWatcher
1818
private Action<FileInfo>? _onFileChanged;
1919
private int _lastLineCount;
2020
private Timer? _debounceTimer;
21-
private readonly object _debounceLock = new object();
21+
private readonly object _debounceLock = new();
2222
private const int DebounceDelayMs = 200;
2323

2424
public FileInfo CurrentFile { get; private set; }

0 commit comments

Comments
 (0)