From d01c7120a6964e71ccd4c4ba3cd50af909aaaaf7 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sun, 30 Aug 2020 22:19:40 +0200 Subject: [PATCH] Log STUN responses at 'debug' level only On busy servers, the amount of STUN queries can be overwhelming, so don't log those at 'info' level. --- CHANGELOG.md | 1 + src/stun.erl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3591a2..335d231 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Log relay allocation refreshes at notice level. * Log duration of TURN sessions. +* Log STUN queries at debug (rather than info) level. * Hand over more metadata to STUN callback. # Version 1.0.37 diff --git a/src/stun.erl b/src/stun.erl index 23b662c..ba4407d 100644 --- a/src/stun.erl +++ b/src/stun.erl @@ -299,10 +299,10 @@ process(State, #stun{class = request, AddrPort = unmap_v4_addr(State#state.peer), R = case stun_codec:version(Msg) of old -> - ?LOG_INFO("Responding to 'classic' STUN request"), + ?LOG_DEBUG("Responding to 'classic' STUN request"), Resp#stun{class = response, 'MAPPED-ADDRESS' = AddrPort}; new -> - ?LOG_INFO("Responding to STUN request"), + ?LOG_DEBUG("Responding to STUN request"), Resp#stun{class = response, 'XOR-MAPPED-ADDRESS' = AddrPort} end, run_hook(stun_query, State, Msg),