1
0

Replace tab characters with spaces. No other changes.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/logging/trunk@581090 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dennis Lundberg
2007-10-01 22:01:06 +00:00
parent 78942c8588
commit 051b217ae3
12 changed files with 791 additions and 791 deletions

View File

@@ -1092,7 +1092,7 @@ public abstract class LogFactory {
*/
protected static LogFactory newFactory(final String factoryClass,
final ClassLoader classLoader) {
return newFactory(factoryClass, classLoader, null);
return newFactory(factoryClass, classLoader, null);
}
/**
@@ -1182,7 +1182,7 @@ public abstract class LogFactory {
// loading with that loader (not the TCCL). Just throw an
// appropriate exception here.
final boolean implementsLogFactory = implementsLogFactory(logFactoryClass);
final boolean implementsLogFactory = implementsLogFactory(logFactoryClass);
//
// Construct a good message: users may not actual expect that a custom implementation
@@ -1195,13 +1195,13 @@ public abstract class LogFactory {
+ LogFactory.class.getName() + "'. ";
if (implementsLogFactory) {
msg = msg + "The conflict is caused by the presence of multiple LogFactory classes in incompatible classloaders. " +
"Background can be found in http://commons.apache.org/logging/tech.html. " +
"If you have not explicitly specified a custom LogFactory then it is likely that " +
"the container has set one without your knowledge. " +
"In this case, consider using the commons-logging-adapters.jar file or " +
"specifying the standard LogFactory from the command line. ";
"Background can be found in http://commons.apache.org/logging/tech.html. " +
"If you have not explicitly specified a custom LogFactory then it is likely that " +
"the container has set one without your knowledge. " +
"In this case, consider using the commons-logging-adapters.jar file or " +
"specifying the standard LogFactory from the command line. ";
} else {
msg = msg + "Please check the custom implementation. ";
msg = msg + "Please check the custom implementation. ";
}
msg = msg + "Help can be found @http://commons.apache.org/logging/troubleshooting.html.";
@@ -1563,31 +1563,31 @@ public abstract class LogFactory {
*/
private static void initDiagnostics() {
String dest;
try {
dest = getSystemProperty(DIAGNOSTICS_DEST_PROPERTY, null);
if (dest == null) {
return;
}
} catch(SecurityException ex) {
// We must be running in some very secure environment.
// We just have to assume output is not wanted..
return;
}
if (dest.equals("STDOUT")) {
diagnosticsStream = System.out;
} else if (dest.equals("STDERR")) {
diagnosticsStream = System.err;
} else {
try {
try {
dest = getSystemProperty(DIAGNOSTICS_DEST_PROPERTY, null);
if (dest == null) {
return;
}
} catch(SecurityException ex) {
// We must be running in some very secure environment.
// We just have to assume output is not wanted..
return;
}
if (dest.equals("STDOUT")) {
diagnosticsStream = System.out;
} else if (dest.equals("STDERR")) {
diagnosticsStream = System.err;
} else {
try {
// open the file in append mode
FileOutputStream fos = new FileOutputStream(dest, true);
diagnosticsStream = new PrintStream(fos);
} catch(IOException ex) {
// We should report this to the user - but how?
return;
}
}
FileOutputStream fos = new FileOutputStream(dest, true);
diagnosticsStream = new PrintStream(fos);
} catch(IOException ex) {
// We should report this to the user - but how?
return;
}
}
// In order to avoid confusion where multiple instances of JCL are
// being used via different classloaders within the same app, we

View File

@@ -1364,9 +1364,9 @@ public class LogFactoryImpl extends LogFactory {
+ discoveryFlaw.getLocalizedMessage());
if (discoveryFlaw instanceof InvocationTargetException ) {
// Ok, the lib is there but while trying to create a real underlying
// logger something failed in the underlying lib; display info about
// that if possible.
// Ok, the lib is there but while trying to create a real underlying
// logger something failed in the underlying lib; display info about
// that if possible.
InvocationTargetException ite = (InvocationTargetException)discoveryFlaw;
Throwable cause = ite.getTargetException();
if (cause != null) {

View File

@@ -137,11 +137,11 @@ public class SimpleLog implements Log, Serializable {
private static String getStringProperty(String name) {
String prop = null;
try {
prop = System.getProperty(name);
} catch (SecurityException e) {
; // Ignore
}
try {
prop = System.getProperty(name);
} catch (SecurityException e) {
; // Ignore
}
return (prop == null) ? simpleLogProps.getProperty(name) : prop;
}
@@ -308,7 +308,7 @@ public class SimpleLog implements Log, Serializable {
}
// Append the name of the log instance if so configured
if( showShortName) {
if( showShortName) {
if( shortLogName==null ) {
// Cut all but the last component of the name for both styles
shortLogName = logName.substring(logName.lastIndexOf(".") + 1);