aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/slskd/Application.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs
index dfdd2d78..b6d29d6b 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<LogHub> 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<LogHub> LogHub { get; set; }
/// <summary>
/// Gets the version of the latest application release.