mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 21:27:22 +01:00
add logging of ip
This commit is contained in:
parent
8939585c3c
commit
0a4825fe78
1 changed files with 3 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
|||
using MareSynchronos.API;
|
||||
using MareSynchronosServer.Data;
|
||||
using MareSynchronosServer.Metrics;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
|
@ -83,6 +84,8 @@ namespace MareSynchronosServer.Hubs
|
|||
|
||||
public override Task OnConnectedAsync()
|
||||
{
|
||||
var feature = Context.Features.Get<IHttpConnectionFeature>();
|
||||
_logger.LogInformation("Connection from " + feature.RemoteIpAddress);
|
||||
MareMetrics.Connections.Inc();
|
||||
return base.OnConnectedAsync();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue