Author: bayard
Date: Sun Nov 14 05:35:13 2010
New Revision: 1034934
URL: http://svn.apache.org/viewvc?rev=1034934&view=rev
Log:
Switching the Logger to use the constructor parameter PrintStream instead of a
hardcoded System.out. Also protected the only use of mOut in Logger from a null
mOut. It would be a better API to throw an NPE if one is passed in, but that
would affect backwards compat.
Modified:
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Logger.java
Modified:
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Logger.java
URL:
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Logger.java?rev=1034934&r1=1034933&r2=1034934&view=diff
==============================================================================
---
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Logger.java
(original)
+++
tomcat/taglibs/standard/trunk/jstlel/src/main/java/org/apache/taglibs/standard/lang/jstl/Logger.java
Sun Nov 14 05:35:13 2010
@@ -76,14 +76,16 @@ public class Logger
throws ELException
{
if (isLoggingWarning ()) {
- if (pMessage == null) {
- System.out.println (pRootCause);
- }
- else if (pRootCause == null) {
- System.out.println (pMessage);
- }
- else {
- System.out.println (pMessage + ": " + pRootCause);
+ if(mOut != null) {
+ if (pMessage == null) {
+ mOut.println (pRootCause);
+ }
+ else if (pRootCause == null) {
+ mOut.println (pMessage);
+ }
+ else {
+ mOut.println (pMessage + ": " + pRootCause);
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]