You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2004/02/10 18:09:18 UTC
cvs commit: avalon/logging/site/xdocs/about index.xml
mcconnell 2004/02/10 09:09:18
Modified: logging/api/src/java/org/apache/avalon/logging/provider
LoggingCriteria.java
logging/logkit/impl/src/java/org/apache/avalon/logging/logkit
DefaultLoggingCriteria.java
DefaultLoggingFactory.java
logging/site/xdocs/about index.xml
Log:
Housekeeping.
Revision Changes Path
1.2 +21 -1 avalon/logging/api/src/java/org/apache/avalon/logging/provider/LoggingCriteria.java
Index: LoggingCriteria.java
===================================================================
RCS file: /home/cvs/avalon/logging/api/src/java/org/apache/avalon/logging/provider/LoggingCriteria.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LoggingCriteria.java 4 Feb 2004 20:48:50 -0000 1.1
+++ LoggingCriteria.java 10 Feb 2004 17:09:18 -0000 1.2
@@ -65,6 +65,12 @@
String LOGGING_BASEDIR_KEY =
"avalon.logging.basedir";
+ /**
+ * Debug mode.
+ */
+ String LOGGING_DEBUG_KEY =
+ "avalon.logging.debug";
+
//--------------------------------------------------------------
// operations
//--------------------------------------------------------------
@@ -94,6 +100,12 @@
void setConfiguration( Configuration config );
/**
+ * Set the debug enabled policy
+ * @param mode TRUE to enabled debug mode else FALSE
+ */
+ void setDebugEnabled( boolean mode );
+
+ /**
* Get the bootstrap logging channel
* @return the boootstrap logging channel
*/
@@ -116,5 +128,13 @@
* @return the logging implementation factory classname
*/
Artifact getFactoryArtifact() throws IOException;
+
+ /**
+ * Return debug policy. If TRUE all logging channels will be
+ * set to debug level.
+ *
+ * @return the debug policy
+ */
+ public boolean isDebugEnabled();
}
1.2 +30 -1 avalon/logging/logkit/impl/src/java/org/apache/avalon/logging/logkit/DefaultLoggingCriteria.java
Index: DefaultLoggingCriteria.java
===================================================================
RCS file: /home/cvs/avalon/logging/logkit/impl/src/java/org/apache/avalon/logging/logkit/DefaultLoggingCriteria.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultLoggingCriteria.java 4 Feb 2004 20:48:58 -0000 1.1
+++ DefaultLoggingCriteria.java 10 Feb 2004 17:09:18 -0000 1.2
@@ -41,8 +41,10 @@
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+
import org.apache.excalibur.configuration.ConfigurationUtil;
+
/**
* DefaultLoggingCriteria is a class holding the values supplied by a user
* for application to a LoggingManager factory.
@@ -80,6 +82,10 @@
LOGGING_BASEDIR_KEY,
File.class,
BASEDIR ),
+ new Parameter(
+ LOGGING_DEBUG_KEY,
+ Boolean.class,
+ new Boolean( false ) ),
new LoggerParameter(
LOGGING_BOOTSTRAP_KEY,
new ConsoleLogger( ConsoleLogger.LEVEL_WARN ) ),
@@ -126,6 +132,15 @@
//--------------------------------------------------------------
/**
+ * Set the debug enabled policy
+ * @param mode TRUE to enabled debug mode else FALSE
+ */
+ public void setDebugEnabled( boolean mode )
+ {
+ put( LOGGING_DEBUG_KEY, new Boolean( mode ) );
+ }
+
+ /**
* Set the bootstrap logging channel
* @param logger the boootstrap logging channel
*/
@@ -205,6 +220,20 @@
return Artifact.createArtifact( value );
}
}
+
+ /**
+ * Return debug policy. If TRUE all logging channels will be
+ * set to debug level.
+ *
+ * @return the debug policy
+ */
+ public boolean isDebugEnabled()
+ {
+ Boolean value = (Boolean) get( LOGGING_DEBUG_KEY );
+ if( null != value ) return value.booleanValue();
+ return false;
+ }
+
private static Artifact getDefaultImplementationArtifact(
InitialContext context )
1.2 +7 -1 avalon/logging/logkit/impl/src/java/org/apache/avalon/logging/logkit/DefaultLoggingFactory.java
Index: DefaultLoggingFactory.java
===================================================================
RCS file: /home/cvs/avalon/logging/logkit/impl/src/java/org/apache/avalon/logging/logkit/DefaultLoggingFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultLoggingFactory.java 4 Feb 2004 20:49:00 -0000 1.1
+++ DefaultLoggingFactory.java 10 Feb 2004 17:09:18 -0000 1.2
@@ -185,11 +185,17 @@
config.getChild( "logger" ).getAttribute( "name", "logger" );
//
+ // get the debug policy
+ //
+
+ boolean debug = criteria.isDebugEnabled();
+
+ //
// create a logkit logging mananager
//
LoggingManager manager =
- new DefaultLoggingManager( m_logger, m_targets, categories, internal, false );
+ new DefaultLoggingManager( m_logger, m_targets, categories, internal, debug );
//
// setup the default log target
1.2 +19 -8 avalon/logging/site/xdocs/about/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/avalon/logging/site/xdocs/about/index.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.xml 4 Feb 2004 20:49:16 -0000 1.1
+++ index.xml 10 Feb 2004 17:09:18 -0000 1.2
@@ -19,18 +19,29 @@
<document>
- <properties>
- <author email="mcconnell@apache.org">Stephen McConnell</author>
- <title>Avalon Logging</title>
- </properties>
+ <properties>
+ <author email="mcconnell@apache.org">Stephen McConnell</author>
+ <title>Avalon Logging</title>
+ </properties>
- <body>
+ <body>
- <section name="Avalon Logging">
+ <section name="Avalon Logging">
- </section>
+ <p>
+ The avalon-logging package is a open logging platform suitable for
+ use by container implementators. It is based largely on the original
+ excalibur logging system but with some important changes. Firstly
+ it leverages the avalon-repository technology to support dynamic
+ loading of implementation strategies, secondly, it simplies the
+ overall approach to target configuration, and thirdly, it applies
+ a formal logging category meta-data model that is consitent with
+ model-driven container solutions.
+ </p>
- </body>
+ </section>
+
+ </body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org