aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_watchdog.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2014-05-22 11:01:45 +0200
committerAnders Svensson <[email protected]>2014-05-26 13:52:04 +0200
commit0058430352420a8c0dc053900f108e7086f52fad (patch)
tree544c700d2d3b6fb467b766e4aa81a39ca71af5d2 /lib/diameter/src/base/diameter_watchdog.erl
parent6202139d7680be7df2fc5a6d6138409c1ae780d6 (diff)
downloadotp-0058430352420a8c0dc053900f108e7086f52fad.tar.gz
otp-0058430352420a8c0dc053900f108e7086f52fad.tar.bz2
otp-0058430352420a8c0dc053900f108e7086f52fad.zip
Replace traffic-related log reports with no-op function calls
The former were a little over-enthusiastic and could cause a node to be logged to death if a peer Diameter node was sufficiently ill-willed. The function calls are to diameter_lib:log/4, the arguments of which identify the happening in question, and which does nothing but provide a function to trace on. Many existing log calls have been shrunk. The only remaining traffic-related report (hopefully) is that resulting from {answer_errors, report} config, and this has been slimmed.
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index dbfe087659..5e27778432 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -219,7 +219,6 @@ dict0(_, _, Acc) ->
Acc.
config_error(T) ->
- diameter_lib:error_report(configuration_error, T),
exit({shutdown, {configuration_error, T}}).
%% handle_call/3
@@ -268,7 +267,7 @@ event(Msg,
TPid = tpid(F,T),
E = {[TPid | data(Msg, TPid, From, To)], From, To},
send(Pid, {watchdog, self(), E}),
- ?LOG(transition, {self(), E}).
+ ?LOG(transition, {From, To}).
data(Msg, TPid, reopen, okay) ->
{recv, TPid, 'DWA', _Pkt} = Msg, %% assert
@@ -562,6 +561,7 @@ recv(Name, Pkt, S) ->
rcv('DWR', Pkt, #watchdog{transport = TPid,
dictionary = Dict0}) ->
+ ?LOG(recv, 'DWR'),
DPkt = diameter_codec:decode(Dict0, Pkt),
diameter_traffic:incr_error(recv, DPkt, TPid),
EPkt = encode(dwa, Dict0, Pkt),
@@ -572,6 +572,7 @@ rcv('DWR', Pkt, #watchdog{transport = TPid,
rcv('DWA', Pkt, #watchdog{transport = TPid,
dictionary = Dict0}) ->
+ ?LOG(recv, 'DWA'),
diameter_traffic:incr_rc(recv,
diameter_codec:decode(Dict0, Pkt),
TPid,