LANCommander/LANCommander.Server/Hubs/LoggingHub.cs
2024-08-29 00:19:56 -05:00

16 lines
No EOL
442 B
C#

using LANCommander.SDK;
using LANCommander.Server.Services;
using Microsoft.AspNetCore.SignalR;
using Serilog.Events;
namespace LANCommander.Server.Hubs
{
public class LoggingHub : Hub
{
public static async Task Log(IHubContext<LoggingHub> context, string message, LogEvent logEvent)
{
await context.Clients.All.SendAsync("Log", message, logEvent.Level, logEvent.Timestamp.DateTime);
}
}
}