diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-10-05 08:25:45 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-10-05 08:25:45 -0500 |
| commit | 18cd187fc4d1cd0eacc77ad5290ae060c08263ff (patch) | |
| tree | 9b0d90534ff184016fdf8d78c14b6c0f84905715 | |
| parent | f7958c7fa8dba310d5e75d491214de7866862b87 (diff) | |
| download | slskd-18cd187fc4d1cd0eacc77ad5290ae060c08263ff.tar.gz | |
bind the LogEmitted event to the hub
| -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..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. |
