mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-08 17:45:24 +02:00
Add file names to tracing, and flush trace after output
This commit is contained in:
parent
2bd06778f7
commit
cce0ccaf7b
3 changed files with 8 additions and 6 deletions
|
@ -81,6 +81,7 @@ public class Activator extends AbstractUIPlugin {
|
||||||
if (isTracingOn()) {
|
if (isTracingOn()) {
|
||||||
String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg;
|
String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg;
|
||||||
System.out.println(fullMsg);
|
System.out.println(fullMsg);
|
||||||
|
System.out.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ public class Activator extends Plugin {
|
||||||
if (isTracingOn()) {
|
if (isTracingOn()) {
|
||||||
String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg;
|
String fullMsg = getTimestamp() + " | " + Thread.currentThread().getName() + " | " + msg;
|
||||||
System.out.println(fullMsg);
|
System.out.println(fullMsg);
|
||||||
|
System.out.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,14 +189,14 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
}
|
}
|
||||||
dst += remoteFile;
|
dst += remoteFile;
|
||||||
}
|
}
|
||||||
getChannel("SftpFileService.upload").put(localFile.getAbsolutePath(), dst, sftpMonitor, mode); //$NON-NLS-1$
|
getChannel("SftpFileService.upload "+remoteFile).put(localFile.getAbsolutePath(), dst, sftpMonitor, mode); //$NON-NLS-1$
|
||||||
Activator.trace("SftpFileService.upload ok"); //$NON-NLS-1$
|
Activator.trace("SftpFileService.upload "+remoteFile+ " ok"); //$NON-NLS-1$ //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
//TODO See download
|
//TODO See download
|
||||||
//e.printStackTrace();
|
//e.printStackTrace();
|
||||||
//throw new RemoteFileIOException(e);
|
//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 false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -266,8 +266,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
String remotePath = remoteParent+'/'+remoteFile;
|
String remotePath = remoteParent+'/'+remoteFile;
|
||||||
int mode=ChannelSftp.OVERWRITE;
|
int mode=ChannelSftp.OVERWRITE;
|
||||||
MyProgressMonitor sftpMonitor = new MyProgressMonitor(monitor);
|
MyProgressMonitor sftpMonitor = new MyProgressMonitor(monitor);
|
||||||
getChannel("SftpFileService.download").get(remotePath, localFile.getAbsolutePath(), sftpMonitor, mode); //$NON-NLS-1$
|
getChannel("SftpFileService.download "+remoteFile).get(remotePath, localFile.getAbsolutePath(), sftpMonitor, mode); //$NON-NLS-1$
|
||||||
Activator.trace("SftpFileService.download ok"); //$NON-NLS-1$
|
Activator.trace("SftpFileService.download "+remoteFile+ " ok"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
//TODO handle exception properly: happens e.g. when trying to download a symlink.
|
//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.
|
//<=3 (e.g. "4: Failure"). therefore it is better for now to just return false.
|
||||||
//e.printStackTrace();
|
//e.printStackTrace();
|
||||||
//throw new RemoteFileIOException(e);
|
//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 false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue