aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-03-27 15:39:16 +0100
committerMicael Karlberg <[email protected]>2019-03-28 17:14:56 +0100
commit2a82321d9c4aea154161c79f55d7854ae182d002 (patch)
treeba854f5c337131c482700d820b54e14a0c3ea6d2 /lib/snmp/src
parentb528d830a741f6611b704ddcce1e702b41757c36 (diff)
downloadotp-2a82321d9c4aea154161c79f55d7854ae182d002.tar.gz
otp-2a82321d9c4aea154161c79f55d7854ae182d002.tar.bz2
otp-2a82321d9c4aea154161c79f55d7854ae182d002.zip
[snmp|agent] Verbose (debug) improvements
Added VMODULE for the two new modules. Also, improved some verbose printouts. OTP-15691
Diffstat (limited to 'lib/snmp/src')
-rw-r--r--lib/snmp/src/agent/snmpa_get.erl1
-rw-r--r--lib/snmp/src/agent/snmpa_get_lib.erl7
-rw-r--r--lib/snmp/src/agent/snmpa_trap.erl2
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/snmp/src/agent/snmpa_get.erl b/lib/snmp/src/agent/snmpa_get.erl
index 50aab6b487..e67975a67d 100644
--- a/lib/snmp/src/agent/snmpa_get.erl
+++ b/lib/snmp/src/agent/snmpa_get.erl
@@ -33,6 +33,7 @@
do_get_bulk/7
]).
+-define(VMODULE,"GET").
-include("snmpa_internal.hrl").
-include("snmp_types.hrl").
-include("snmp_debug.hrl").
diff --git a/lib/snmp/src/agent/snmpa_get_lib.erl b/lib/snmp/src/agent/snmpa_get_lib.erl
index 7929b10cf3..eaf7fe2641 100644
--- a/lib/snmp/src/agent/snmpa_get_lib.erl
+++ b/lib/snmp/src/agent/snmpa_get_lib.erl
@@ -43,6 +43,7 @@
user_err/2
]).
+-define(VMODULE,"GET-LIB").
-include("snmpa_internal.hrl").
-include("snmp_types.hrl").
-include("snmp_debug.hrl").
@@ -226,7 +227,7 @@ dbg_apply(M, F, A) ->
silence ->
apply(M,F,A);
_ ->
- ?vlog("~n apply: ~w,~w,~p~n", [M,F,A]),
+ ?vlog("~n apply: ~w, ~w, ~p~n", [M,F,A]),
Res = (catch apply(M,F,A)),
case Res of
{'EXIT', Reason} ->
@@ -237,9 +238,9 @@ dbg_apply(M, F, A) ->
"~n"
"~nresulted in an exit"
"~n"
- "~n ~p", [M, F, A, Reason]);
+ "~n ~p~n", [M, F, A, Reason]);
_ ->
- ?vlog("~n returned: ~p", [Res])
+ ?vlog("~n returned: ~p~n", [Res])
end,
Res
end.
diff --git a/lib/snmp/src/agent/snmpa_trap.erl b/lib/snmp/src/agent/snmpa_trap.erl
index e75016f7ec..31805c3bee 100644
--- a/lib/snmp/src/agent/snmpa_trap.erl
+++ b/lib/snmp/src/agent/snmpa_trap.erl
@@ -917,7 +917,7 @@ do_send_v2_trap(Recvs, Vbs, ExtraInfo, NetIf) ->
TrapPdu = make_v2_notif_pdu(Vbs, 'snmpv2-trap'),
AddrCommunities = mk_addr_communities(Recvs),
lists:foreach(fun({Community, Addrs}) ->
- ?vtrace("~n send v2 trap to ~p",[Addrs]),
+ ?vtrace("send v2 trap to ~p",[Addrs]),
NetIf ! {send_pdu, 'version-2', TrapPdu,
{community, Community}, Addrs, ExtraInfo}
end, AddrCommunities),