1
0

Handle null log4j logger param to constructor better than just causing NullPointerException.

Thanks to Lilianne E. Blaze for the patch; see jira LOGGING-111.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@476774 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Kitching
2006-11-19 08:57:51 +00:00
parent 342bbe7a7a
commit 256ada0e80

View File

@@ -109,9 +109,14 @@ public class Log4JLogger implements Log, Serializable {
this.logger = getLogger();
}
/** For use with a log4j factory.
/**
* For use with a log4j factory.
*/
public Log4JLogger(Logger logger ) {
if (logger == null) {
throw new IllegalArgumentException(
"Warning - null logger in constructor; possible log4j misconfiguration.");
}
this.name = logger.getName();
this.logger=logger;
}