diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-10-05 09:27:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-05 09:27:54 -0500 |
| commit | 228cd7f97761137bde191d45c1771879a8d45de3 (patch) | |
| tree | 814080998abb27aa0edf07585b9833c5c56c4535 /src/slskd/Application.cs | |
| parent | 1c790a33ba51598e5d5e9da77cf294c601e702be (diff) | |
| parent | 869bbac175c9ee55a6e0ed4c30237ec969e48dc0 (diff) | |
| download | slskd-228cd7f97761137bde191d45c1771879a8d45de3.tar.gz | |
Merge pull request #208 from slskd/buffer-logs
Buffer application logs and make them available via a REST API and SignalR hub
Diffstat (limited to 'src/slskd/Application.cs')
| -rw-r--r-- | src/slskd/Application.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index dfdd2d78..1027d7f3 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -64,7 +64,8 @@ namespace slskd IRoomService roomService, ISharedFileCache sharedFileCache, IPushbulletService pushbulletService, - IHubContext<ApplicationHub> applicationHub) + IHubContext<ApplicationHub> applicationHub, + IHubContext<LogsHub> logHub) { OptionsAtStartup = optionsAtStartup; @@ -87,6 +88,9 @@ namespace slskd RoomService = roomService; ApplicationHub = applicationHub; + LogHub = logHub; + Program.LogEmitted += (_, log) => LogHub.EmitLogAsync(log); + Client = soulseekClient; Client.DiagnosticGenerated += Client_DiagnosticGenerated; @@ -128,6 +132,7 @@ namespace slskd private IManagedState<State> State { get; } private ITransferTracker TransferTracker { get; set; } private IHubContext<ApplicationHub> ApplicationHub { get; set; } + private IHubContext<LogsHub> LogHub { get; set; } /// <summary> /// Gets the version of the latest application release. |
