aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/doc
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2015-05-18 09:54:59 +0200
committerErlang/OTP <[email protected]>2015-05-18 09:54:59 +0200
commit6fcede32f0e6ee2ee366736423eddcb046594d5b (patch)
treef45738189beeeb81755a75bb71d39b1f845dd335 /lib/ssh/doc
parent34a1d0da9beaaf77dd8ea71f3230c750c74ef88c (diff)
parent7aef211a66219b6fef9d0bdaf9b09be6c2e0a32f (diff)
downloadotp-6fcede32f0e6ee2ee366736423eddcb046594d5b.tar.gz
otp-6fcede32f0e6ee2ee366736423eddcb046594d5b.tar.bz2
otp-6fcede32f0e6ee2ee366736423eddcb046594d5b.zip
Merge branch 'hans/ssh/ssh_msg_debug_fun/OTP-12738' into maint-17
* hans/ssh/ssh_msg_debug_fun/OTP-12738: ssh: option for handling the SSH_MSG_DEBUG message's printouts
Diffstat (limited to 'lib/ssh/doc')
-rw-r--r--lib/ssh/doc/src/ssh.xml20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml
index 72dafc0c09..501668ca78 100644
--- a/lib/ssh/doc/src/ssh.xml
+++ b/lib/ssh/doc/src/ssh.xml
@@ -201,6 +201,14 @@
<tag><c><![CDATA[{idle_time, integer()}]]></c></tag>
<item>
<p>Sets a timeout on connection when no channels are active, default is infinity</p></item>
+
+ <tag><c><![CDATA[{ssh_msg_debug_fun, fun(ConnectionRef::ssh_connection_ref(), AlwaysDisplay::boolean(), Msg::binary(), LanguageTag::binary()) -> _}]]></c></tag>
+ <item>
+ <p>Provide a fun to implement your own logging of the SSH message SSH_MSG_DEBUG. The last three parameters are from the message, see RFC4253, section 11.3. The <c>ConnectionRef</c> is the reference to the connection on which the message arrived. The return value from the fun is not checked.</p>
+ <p>The default behaviour is ignore the message.
+ To get a printout for each message with <c>AlwaysDisplay = true</c>, use for example <c>{ssh_msg_debug_fun, fun(_,true,M,_)-> io:format("DEBUG: ~p~n", [M]) end}</c></p>
+ </item>
+
</taglist>
</desc>
</func>
@@ -383,8 +391,16 @@
<item>
<p>Provide a fun to implement your own logging when a user disconnects from the server.</p>
</item>
- </taglist>
- </desc>
+
+ <tag><c><![CDATA[{ssh_msg_debug_fun, fun(ConnectionRef::ssh_connection_ref(), AlwaysDisplay::boolean(), Msg::binary(), LanguageTag::binary()) -> _}]]></c></tag>
+ <item>
+ <p>Provide a fun to implement your own logging of the SSH message SSH_MSG_DEBUG. The last three parameters are from the message, see RFC4253, section 11.3. The <c>ConnectionRef</c> is the reference to the connection on which the message arrived. The return value from the fun is not checked.</p>
+ <p>The default behaviour is ignore the message.
+ To get a printout for each message with <c>AlwaysDisplay = true</c>, use for example <c>{ssh_msg_debug_fun, fun(_,true,M,_)-> io:format("DEBUG: ~p~n", [M]) end}</c></p>
+ </item>
+
+ </taglist>
+ </desc>
</func>