Fixes 310605 (Make a clean room implementation of the JSP logger bridge).
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1571 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
19368f3985
commit
79f6d89da8
|
@ -22,6 +22,7 @@ jetty-7.1.0-SNAPSHOT
|
|||
+ Add AnnotationConfiguration to jetty-plus.xml
|
||||
+ 310467 Allow SocketConnector to create generic Connection objects
|
||||
+ 310603 Make Logger interface consistent
|
||||
+ 310605 Make a clean room implementation of the JSP logger bridge
|
||||
|
||||
jetty-7.0.2.v20100331 31 March 2010
|
||||
+ 297552 Don't call Continuation timeouts from acceptor tick
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
package org.eclipse.jetty.jsp;
|
||||
|
||||
import com.sun.org.apache.commons.logging.LogFactory;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
||||
/**
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public class JettyLog implements com.sun.org.apache.commons.logging.Log
|
||||
{
|
||||
private static volatile boolean __initialized;
|
||||
|
||||
/**
|
||||
* Called via reflection from WebXmlProcessor
|
||||
*/
|
||||
public static synchronized void init()
|
||||
{
|
||||
if (!__initialized)
|
||||
{
|
||||
__initialized = true;
|
||||
LogFactory.setLogImplClassName(JettyLog.class.getName());
|
||||
}
|
||||
}
|
||||
|
||||
private final Logger _logger;
|
||||
|
||||
public JettyLog(String name)
|
||||
{
|
||||
_logger = Log.getLogger(name);
|
||||
}
|
||||
|
||||
public void fatal(Object o)
|
||||
{
|
||||
error(o);
|
||||
}
|
||||
|
||||
public void fatal(Object o, Throwable throwable)
|
||||
{
|
||||
error(o, throwable);
|
||||
}
|
||||
|
||||
public boolean isErrorEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void error(Object o)
|
||||
{
|
||||
warn(o);
|
||||
}
|
||||
|
||||
public void error(Object o, Throwable throwable)
|
||||
{
|
||||
_logger.warn(String.valueOf(o), throwable);
|
||||
}
|
||||
|
||||
public boolean isWarnEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void warn(Object o)
|
||||
{
|
||||
_logger.warn(String.valueOf(o));
|
||||
}
|
||||
|
||||
public boolean isInfoEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void info(Object o)
|
||||
{
|
||||
_logger.info(String.valueOf(o));
|
||||
}
|
||||
|
||||
public boolean isDebugEnabled()
|
||||
{
|
||||
return _logger.isDebugEnabled();
|
||||
}
|
||||
|
||||
public void debug(Object o)
|
||||
{
|
||||
_logger.debug(String.valueOf(o));
|
||||
}
|
||||
|
||||
public void debug(Object o, Throwable throwable)
|
||||
{
|
||||
_logger.debug(String.valueOf(o), throwable);
|
||||
}
|
||||
|
||||
public boolean isTraceEnabled()
|
||||
{
|
||||
return isDebugEnabled();
|
||||
}
|
||||
|
||||
public void trace(Object o)
|
||||
{
|
||||
debug(o);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue