mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Add logging
This commit is contained in:
@@ -45,8 +45,13 @@ public class MessageHandler : IHostedService
|
||||
|
||||
private async Task RequestLatestStatus()
|
||||
{
|
||||
WriteLog("RequestLatestStatus");
|
||||
|
||||
foreach (var device in _deviceRepository.Values)
|
||||
{
|
||||
WriteLog($"RequestLatestStatus: {device.Name}");
|
||||
await SendDeviceStatus(device);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task OnInterceptingPublishAsync(InterceptingPublishEventArgs arg)
|
||||
|
||||
@@ -11,13 +11,15 @@ namespace ChrisKaczor.HomeMonitor.Hub.Service.Hubs
|
||||
[UsedImplicitly]
|
||||
public async Task RequestLatestStatus()
|
||||
{
|
||||
Console.WriteLine("RequestLatestStatus");
|
||||
|
||||
await Clients.Others.SendAsync("RequestLatestStatus");
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public async Task SendLatestStatus(string message)
|
||||
{
|
||||
Console.WriteLine(message);
|
||||
Console.WriteLine($"LatestStatus: {message}");
|
||||
|
||||
await Clients.Others.SendAsync("LatestStatus", message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user