in src/main/java/org/apache/commons/logging/LogFactory.java [1460:1487]
private static PrintStream initDiagnostics() {
String dest;
try {
dest = getSystemProperty(DIAGNOSTICS_DEST_PROPERTY, null);
if (dest == null) {
return null;
}
} catch (final SecurityException ex) {
// We must be running in some very secure environment.
// We just have to assume output is not wanted..
return null;
}
if (dest.equals("STDOUT")) {
return System.out;
}
if (dest.equals("STDERR")) {
return System.err;
}
try {
// open the file in append mode
final FileOutputStream fos = new FileOutputStream(dest, true);
return new PrintStream(fos);
} catch (final IOException ex) {
// We should report this to the user - but how?
return null;
}
}