You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ho...@apache.org on 2005/07/07 07:14:43 UTC
cvs commit: logging-log4j-sandbox/src/java/org/apache/log4j/servlet InitShutdownController.java ServletContextLogAppender.java
hoju 2005/07/06 22:14:43
Modified: src/java/org/apache/log4j/servlet
InitShutdownController.java
ServletContextLogAppender.java
Log:
Runtime compatibility with Log4j-1.2.xx (I think). Still need 1.3 to compile.
Revision Changes Path
1.8 +4 -5 logging-log4j-sandbox/src/java/org/apache/log4j/servlet/InitShutdownController.java
Index: InitShutdownController.java
===================================================================
RCS file: /home/cvs/logging-log4j-sandbox/src/java/org/apache/log4j/servlet/InitShutdownController.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- InitShutdownController.java 9 Jan 2005 13:45:18 -0000 1.7
+++ InitShutdownController.java 7 Jul 2005 05:14:43 -0000 1.8
@@ -19,7 +19,6 @@
import org.apache.log4j.LogManager;
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.helpers.LogLog;
-import org.apache.log4j.joran.JoranConfigurator;
import org.apache.log4j.spi.RepositorySelector;
import org.apache.log4j.xml.DOMConfigurator;
@@ -40,7 +39,7 @@
* and {@link InitServlet}, this class can be used by any class at runtime to
* control initialization and shutdown of Log4j loggers and appenders.</p>
*
- * @see http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/AppContainerLogging
+ * @see http://wiki.apache.org/logging-log4j/AppContainerLogging?highlight=%28AppContainerLogging%29
* @author <a href="mailto:hoju@visi.com">Jacob Kjome</a>
* @author Andreas Werner
* @since 1.3
@@ -235,7 +234,7 @@
if (isXMLConfigFile) {
try {
if (joranConfiguratorAvailable()) {
- new JoranConfigurator().doConfigure(log4jURL, LogManager.getLoggerRepository());
+ new org.apache.log4j.joran.JoranConfigurator().doConfigure(log4jURL, LogManager.getLoggerRepository());
} else {
DOMConfigurator.configure(log4jURL);
}
@@ -288,7 +287,7 @@
if (isXMLConfigFile) {
if (joranConfiguratorAvailable()) {
- new JoranConfigurator().doConfigure(contextPath + systemConfigPath, LogManager.getLoggerRepository());
+ new org.apache.log4j.joran.JoranConfigurator().doConfigure(contextPath + systemConfigPath, LogManager.getLoggerRepository());
} else {
DOMConfigurator.configure(contextPath + systemConfigPath);
}
@@ -427,7 +426,7 @@
private static boolean joranConfiguratorAvailable() {
boolean joranAvailable = true;
try {
- Class.forName("org.apache.joran.Interpreter", false, Thread.currentThread().getContextClassLoader());
+ Class.forName("org.apache.log4j.joran.JoranConfigurator", false, Thread.currentThread().getContextClassLoader());
} catch (Exception e) {
joranAvailable = false;
}
1.6 +4 -4 logging-log4j-sandbox/src/java/org/apache/log4j/servlet/ServletContextLogAppender.java
Index: ServletContextLogAppender.java
===================================================================
RCS file: /home/cvs/logging-log4j-sandbox/src/java/org/apache/log4j/servlet/ServletContextLogAppender.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ServletContextLogAppender.java 8 Jan 2005 17:57:29 -0000 1.5
+++ ServletContextLogAppender.java 7 Jul 2005 05:14:43 -0000 1.6
@@ -94,8 +94,8 @@
servletContext = (ServletContext) servletContexts.get(servletContextPath);
if (servletContext == null) {
- getLogger().error(
- "Servlet context [" + servletContextPath + "] could not be found.");
+ //getLogger().error(
+ // "Servlet context [" + servletContextPath + "] could not be found.");
}
}
@@ -114,8 +114,8 @@
// If servlet context is not found, signal an error
if (servletContext == null) {
- getLogger().error(
- "Servlet context [" + servletContextPath + "] could not be found.");
+ //getLogger().error(
+ // "Servlet context [" + servletContextPath + "] could not be found.");
return;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org