ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r885684 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
Date Tue, 01 Dec 2009 07:41:40 GMT
Author: kevj
Date: Tue Dec  1 07:41:40 2009
New Revision: 885684

URL: http://svn.apache.org/viewvc?rev=885684&view=rev
Log:
allow scp verbose flag to actually log info - also makes ssh more chatty

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java?rev=885684&r1=885683&r2=885684&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java Tue Dec
 1 07:41:40 2009
@@ -197,6 +197,17 @@
      */
     protected Session openSession() throws JSchException {
         JSch jsch = new JSch();
+        final SSHBase base = this;
+        if(verbose) {
+        	JSch.setLogger(new com.jcraft.jsch.Logger(){
+        		public boolean isEnabled(int level){
+        			return true;
+        		}
+        		public void log(int level, String message){
+        			base.log(message, Project.MSG_INFO);
+        		}
+        	});
+        }
         if (null != userInfo.getKeyfile()) {
             jsch.addIdentity(userInfo.getKeyfile());
         }



Mime
View raw message