mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Log ip in relay
This commit is contained in:
parent
24ee33489d
commit
64c703cef4
1 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ function connectStream(socket: WebSocket, ip: string | undefined) {
|
|||
|
||||
const result = n.json().pipe(n.clientMsg()).safeParse(e.data);
|
||||
if (result.success) {
|
||||
logi({ level: 'trace', ns: 'ditto.relay.message', data: result.data as JsonValue });
|
||||
logi({ level: 'trace', ns: 'ditto.relay.message', data: result.data as JsonValue, ip });
|
||||
relayMessagesCounter.inc({ verb: result.data[0] });
|
||||
handleMsg(result.data);
|
||||
} else {
|
||||
|
|
@ -170,7 +170,7 @@ function connectStream(socket: WebSocket, ip: string | undefined) {
|
|||
send(['OK', event.id, false, e.message]);
|
||||
} else {
|
||||
send(['OK', event.id, false, 'error: something went wrong']);
|
||||
logi({ level: 'error', ns: 'ditto.relay', msg: 'Error in relay', error: errorJson(e) });
|
||||
logi({ level: 'error', ns: 'ditto.relay', msg: 'Error in relay', error: errorJson(e), ip });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue