1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Add file names to tracing, and flush trace after output

This commit is contained in:
Martin Oberhuber 2006-05-19 16:27:52 +00:00
parent 2bd06778f7
commit cce0ccaf7b
3 changed files with 8 additions and 6 deletions

View file

@ -81,6 +81,7 @@ public class Activator extends AbstractUIPlugin {
if (isTracingOn()) {
String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg;
System.out.println(fullMsg);
System.out.flush();
}
}

View file

@ -90,6 +90,7 @@ public class Activator extends Plugin {
if (isTracingOn()) {
String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg;
System.out.println(fullMsg);
System.out.flush();
}
}

View file

@ -189,14 +189,14 @@ public class SftpFileService extends AbstractFileService implements IFileService
}
dst += remoteFile;
}
getChannel("SftpFileService.upload").put(localFile.getAbsolutePath(), dst, sftpMonitor, mode); //$NON-NLS-1$
Activator.trace("SftpFileService.upload ok"); //$NON-NLS-1$
getChannel("SftpFileService.upload "+remoteFile).put(localFile.getAbsolutePath(), dst, sftpMonitor, mode); //$NON-NLS-1$
Activator.trace("SftpFileService.upload "+remoteFile+ " ok"); //$NON-NLS-1$ //$NON-NLS-1$
}
catch (Exception e) {
//TODO See download
//e.printStackTrace();
//throw new RemoteFileIOException(e);
Activator.trace("SftpFileService.upload failed: "+e.toString());
Activator.trace("SftpFileService.upload "+remoteFile+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
return true;
@ -266,8 +266,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
String remotePath = remoteParent+'/'+remoteFile;
int mode=ChannelSftp.OVERWRITE;
MyProgressMonitor sftpMonitor = new MyProgressMonitor(monitor);
getChannel("SftpFileService.download").get(remotePath, localFile.getAbsolutePath(), sftpMonitor, mode); //$NON-NLS-1$
Activator.trace("SftpFileService.download ok"); //$NON-NLS-1$
getChannel("SftpFileService.download "+remoteFile).get(remotePath, localFile.getAbsolutePath(), sftpMonitor, mode); //$NON-NLS-1$
Activator.trace("SftpFileService.download "+remoteFile+ " ok"); //$NON-NLS-1$ //$NON-NLS-2$
}
catch (Exception e) {
//TODO handle exception properly: happens e.g. when trying to download a symlink.
@ -275,7 +275,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
//<=3 (e.g. "4: Failure"). therefore it is better for now to just return false.
//e.printStackTrace();
//throw new RemoteFileIOException(e);
Activator.trace("SftpFileService.download failed: "+e.toString()); //$NON-NLS-1$
Activator.trace("SftpFileService.download "+remoteFile+" failed: "+e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
return true;