You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by bl...@apache.org on 2001/10/31 20:39:05 UTC
cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n AbstractBundle.java
bloritsch 01/10/31 11:39:05
Modified: src/scratchpad/org/apache/avalon/excalibur/i18n
AbstractBundle.java
Log:
Extend AbstractLogger to avoid problems
Revision Changes Path
1.3 +5 -16 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n/AbstractBundle.java
Index: AbstractBundle.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n/AbstractBundle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractBundle.java 2001/10/31 19:13:18 1.2
+++ AbstractBundle.java 2001/10/31 19:39:05 1.3
@@ -11,15 +11,13 @@
import java.util.Locale;
import org.apache.log.Logger;
-import org.apache.avalon.framework.logger.Loggable;
+import org.apache.avalon.framework.logger.AbstractLoggable;
import org.apache.avalon.framework.component.Component;
public abstract class AbstractBundle
- implements Bundle, Component, Loggable {
+ extends AbstractLoggable
+ implements Bundle, Component {
- /** Logger */
- protected Logger logger;
-
/** bundle info */
private BundleInfo bundleInfo;
@@ -30,15 +28,6 @@
private long lastModified = -1;
/**
- * Set the logger.
- *
- * @param logger the logger
- */
- public void setLogger( final Logger logger ) {
- this.logger = logger;
- }
-
- /**
* Get the bundle info.
*/
public BundleInfo getBundleInfo() {
@@ -149,11 +138,11 @@
if (!oldKey.equals(varKey))
varValue = values.get(varKey);
if (varValue != null) {
- if (logger.isDebugEnabled()) logger.debug("Substituting var: " + varKey + " --> " + varValue);
+ if (getLogger().isDebugEnabled()) getLogger().debug("Substituting var: " + varKey + " --> " + varValue);
result.append(varValue);
}
else {
- if (logger.isWarnEnabled()) logger.warn(bundleInfo + ": var not found: " + varKey);
+ if (getLogger().isWarnEnabled()) getLogger().warn(bundleInfo + ": var not found: " + varKey);
result.append('{').append(varKey).append('}');
}
if (endPos < lastPos)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>