You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2005/10/11 13:46:15 UTC
svn commit: r312861 - in /cocoon/trunk/src:
java/org/apache/cocoon/components/ComponentInfo.java
java/org/apache/cocoon/core/container/ComponentFactory.java
test/org/apache/cocoon/core/container/RoleManagerTestCase.java
Author: cziegeler
Date: Tue Oct 11 04:46:08 2005
New Revision: 312861
URL: http://svn.apache.org/viewcvs?rev=312861&view=rev
Log:
Remove experimental logging system configuration for a component: always use the provided logging system
Modified:
cocoon/trunk/src/java/org/apache/cocoon/components/ComponentInfo.java
cocoon/trunk/src/java/org/apache/cocoon/core/container/ComponentFactory.java
cocoon/trunk/src/test/org/apache/cocoon/core/container/RoleManagerTestCase.java
Modified: cocoon/trunk/src/java/org/apache/cocoon/components/ComponentInfo.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/ComponentInfo.java?rev=312861&r1=312860&r2=312861&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/ComponentInfo.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/ComponentInfo.java Tue Oct 11 04:46:08 2005
@@ -34,16 +34,7 @@
public static final String TYPE_POOLED = "pooled";
public static final String TYPE_NON_THREAD_SAFE_POOLED = "non-thread-safe-pooled";
- public static final int LOGGING_SYSTEM_LOGKIT = 0;
- public static final int LOGGING_SYSTEM_LOG4J = 1;
- public static final int LOGGING_SYSTEM_COMMONSLOGGING = 2;
-
- public static final String LOGGING_LOGKIT = "logkit";
- public static final String LOGGING_LOG4J = "log4j";
- public static final String LOGGING_COMMONSLOGGING = "commons";
-
private int model;
- private int loggingSystem;
private String initMethodName;
private String destroyMethodName;
private String poolInMethodName;
@@ -54,7 +45,6 @@
public ComponentInfo() {
this.model = MODEL_PRIMITIVE;
- this.loggingSystem = LOGGING_SYSTEM_LOGKIT;
}
/**
@@ -185,14 +175,6 @@
this.setDestroyMethodName(attr.getAttribute("destroy", null));
// logging
this.setLoggerCategory(attr.getAttribute("logger", null));
- final String logSystem = attr.getAttribute("logging", LOGGING_LOGKIT);
- if ( LOGGING_LOG4J.equals(logSystem) ) {
- this.setLoggingSystem(LOGGING_SYSTEM_LOG4J);
- } else if (LOGGING_COMMONSLOGGING.equals(logSystem)) {
- this.setLoggingSystem(LOGGING_SYSTEM_COMMONSLOGGING);
- } else if ( LOGGING_LOGKIT.equals(logSystem) ) {
- this.setLoggingSystem(LOGGING_SYSTEM_LOGKIT);
- }
}
public ComponentInfo duplicate() {
@@ -205,7 +187,6 @@
info.serviceClassName = this.serviceClassName;
info.configuration = this.configuration;
info.loggerCategory = this.loggerCategory;
- info.loggingSystem = this.loggingSystem;
return info;
}
@@ -222,19 +203,5 @@
*/
public void setLoggerCategory(String loggerCategory) {
this.loggerCategory = loggerCategory;
- }
-
- /**
- * @return Returns the loggingSystem.
- */
- public int getLoggingSystem() {
- return this.loggingSystem;
- }
-
- /**
- * @param loggingSystem The loggingSystem to set.
- */
- public void setLoggingSystem(int loggingSystem) {
- this.loggingSystem = loggingSystem;
}
}
Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/ComponentFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/ComponentFactory.java?rev=312861&r1=312860&r2=312861&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/ComponentFactory.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/ComponentFactory.java Tue Oct 11 04:46:08 2005
@@ -81,16 +81,9 @@
Logger actualLogger = this.environment.logger;
final String category = this.serviceInfo.getLoggerCategory();
if ( category != null ) {
- if ( info.getLoggingSystem() == ComponentInfo.LOGGING_SYSTEM_LOGKIT ) {
- // If the handler is created "manually" (e.g. XSP engine), loggerManager can be null
- if( this.environment.loggerManager != null ) {
- actualLogger = this.environment.loggerManager.getLoggerForCategory(category);
- }
- } else if ( info.getLoggingSystem() == ComponentInfo.LOGGING_SYSTEM_LOG4J ) {
- // FIXME - activate me
- // actualLogger = new Log4JLogger(org.apache.log4j.Logger.getLogger(category));
- } else if ( info.getLoggingSystem() == ComponentInfo.LOGGING_SYSTEM_COMMONSLOGGING ) {
- // FIXME - we don't have a wrapper for this
+ // If the handler is created "manually" (e.g. XSP engine), loggerManager can be null
+ if( this.environment.loggerManager != null ) {
+ actualLogger = this.environment.loggerManager.getLoggerForCategory(category);
}
}
this.componentLogger = actualLogger;
Modified: cocoon/trunk/src/test/org/apache/cocoon/core/container/RoleManagerTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/core/container/RoleManagerTestCase.java?rev=312861&r1=312860&r2=312861&view=diff
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/core/container/RoleManagerTestCase.java (original)
+++ cocoon/trunk/src/test/org/apache/cocoon/core/container/RoleManagerTestCase.java Tue Oct 11 04:46:08 2005
@@ -62,8 +62,6 @@
.will(returnValue(null));
child0.expects(once()).method("getAttribute").with(eq("logger"), eq(null))
.will(returnValue(null));
- child0.expects(once()).method("getAttribute").with(eq("logging"), eq(ComponentInfo.LOGGING_LOGKIT))
- .will(returnValue(ComponentInfo.LOGGING_LOGKIT));
child0.expects(once()).method("getChildren").with(eq("hint"))
.will(returnValue(hints));
Mock logger = new Mock(Logger.class);