[Swift-commit] Cog update
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Mon Jan 16 21:30:11 CST 2012
------------------------------------------------------------------------
r3348 | hategan | 2012-01-16 21:27:38 -0600 (Mon, 16 Jan 2012) | 1 line
log stdout/err when job fails
------------------------------------------------------------------------
Index: modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java
===================================================================
--- modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (revision 3347)
+++ modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java (working copy)
@@ -178,23 +178,14 @@
// TODO a single thread can be used here for all processes
List<StreamPair> pairs = new LinkedList<StreamPair>();
- if (!FileLocation.NONE.equals(spec.getStdOutputLocation())) {
- OutputStream os =
- prepareOutStream(spec.getStdOutput(), spec.getStdOutputLocation(), dir,
- getTask(), STDOUT);
- if (os != null) {
- pairs.add(new StreamPair(process.getInputStream(), os));
- }
- }
+ OutputStream os;
+ os = prepareOutStream(spec.getStdOutput(), spec.getStdOutputLocation(), dir,
+ getTask(), STDOUT);
+ pairs.add(new StreamPair(process.getInputStream(), os));
- if (!FileLocation.NONE.equals(spec.getStdErrorLocation())) {
- OutputStream os =
- prepareOutStream(spec.getStdError(), spec.getStdErrorLocation(), dir,
- getTask(), STDERR);
- if (os != null) {
- pairs.add(new StreamPair(process.getErrorStream(), os));
- }
- }
+ os = prepareOutStream(spec.getStdError(), spec.getStdErrorLocation(), dir,
+ getTask(), STDERR);
+ pairs.add(new StreamPair(process.getErrorStream(), os));
/*
* Start redirecting the streams
@@ -245,6 +236,10 @@
}
}
else {
+ if (logger.isDebugEnabled()) {
+ logger.debug("STDOUT: " + pairs.get(0).os.toString());
+ logger.debug("STDERR: " + pairs.get(1).os.toString());
+ }
throw new JobException(exitCode);
}
}
More information about the Swift-commit
mailing list