Skip to Content.
Sympa Menu

notify-dpml - r1384 - in trunk/main: metro/model/src/main/net/dpml/metro/info transit/core/src/main/net/dpml/transit/monitor transit/core/src/main/net/dpml/util

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1384 - in trunk/main: metro/model/src/main/net/dpml/metro/info transit/core/src/main/net/dpml/transit/monitor transit/core/src/main/net/dpml/util
  • Date: Wed, 19 Apr 2006 09:17:45 +0200

Author: mcconnell
Date: 2006-04-19 09:17:38 +0200 (Wed, 19 Apr 2006)
New Revision: 1384

Modified:
trunk/main/metro/model/src/main/net/dpml/metro/info/Priority.java

trunk/main/transit/core/src/main/net/dpml/transit/monitor/LoggingAdapter.java
trunk/main/transit/core/src/main/net/dpml/util/DefaultLogger.java
trunk/main/transit/core/src/main/net/dpml/util/Logger.java
Log:
add support for trace level logging

Modified: trunk/main/metro/model/src/main/net/dpml/metro/info/Priority.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/info/Priority.java
2006-04-19 06:57:00 UTC (rev 1383)
+++ trunk/main/metro/model/src/main/net/dpml/metro/info/Priority.java
2006-04-19 07:17:38 UTC (rev 1384)
@@ -51,16 +51,20 @@
*/
public static final Priority DEBUG = new Priority( "debug", 10 );

+ /**
+ * DEBUG logging priority.
+ */
+ public static final Priority TRACE = new Priority( "trace", 5 );

/**
- * Array of static activation policy enumeration values.
+ * Array of static priority enumeration values.
*/
private static final Priority[] ENUM_VALUES =
- new Priority[]{ERROR, WARN, INFO, DEBUG};
+ new Priority[]{ERROR, WARN, INFO, DEBUG, TRACE};

/**
- * Returns an array of activation enum values.
- * @return the activation policies array
+ * Returns an array of priority enum values.
+ * @return the priority policies array
*/
public static Priority[] values()
{
@@ -102,6 +106,10 @@
{
return DEBUG;
}
+ else if( value.equalsIgnoreCase( "trace" ) )
+ {
+ return TRACE;
+ }
else
{
final String error =

Modified:
trunk/main/transit/core/src/main/net/dpml/transit/monitor/LoggingAdapter.java
===================================================================
---
trunk/main/transit/core/src/main/net/dpml/transit/monitor/LoggingAdapter.java
2006-04-19 06:57:00 UTC (rev 1383)
+++
trunk/main/transit/core/src/main/net/dpml/transit/monitor/LoggingAdapter.java
2006-04-19 07:17:38 UTC (rev 1384)
@@ -92,6 +92,15 @@
//
------------------------------------------------------------------------

/**
+ * Return TRUE is trace level logging is enabled.
+ * @return the enabled state of trace logging
+ */
+ public boolean isTraceEnabled()
+ {
+ return m_logger.isLoggable( Level.FINER );
+ }
+
+ /**
* Return TRUE is debug level logging is enabled.
* @return the enabled state of debug logging
*/
@@ -128,6 +137,18 @@
}

/**
+ * Log a debug message is trace mode is enabled.
+ * @param message the message to log
+ */
+ public void trace( String message )
+ {
+ if( isTraceEnabled() )
+ {
+ m_logger.finer( message );
+ }
+ }
+
+ /**
* Log a debug message is debug mode is enabled.
* @param message the message to log
*/

Modified: trunk/main/transit/core/src/main/net/dpml/util/DefaultLogger.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/util/DefaultLogger.java
2006-04-19 06:57:00 UTC (rev 1383)
+++ trunk/main/transit/core/src/main/net/dpml/util/DefaultLogger.java
2006-04-19 07:17:38 UTC (rev 1384)
@@ -98,6 +98,15 @@
//
------------------------------------------------------------------------

/**
+ * Return TRUE is trace level logging is enabled.
+ * @return the enabled state of trace logging
+ */
+ public boolean isTraceEnabled()
+ {
+ return m_logger.isLoggable( Level.FINER );
+ }
+
+ /**
* Return TRUE is debug level logging is enabled.
* @return the enabled state of debug logging
*/
@@ -134,6 +143,18 @@
}

/**
+ * Log a debug message is trace mode is enabled.
+ * @param message the message to log
+ */
+ public void trace( String message )
+ {
+ if( isTraceEnabled() )
+ {
+ m_logger.finer( message );
+ }
+ }
+
+ /**
* Log a debug message is debug mode is enabled.
* @param message the message to log
*/

Modified: trunk/main/transit/core/src/main/net/dpml/util/Logger.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/util/Logger.java 2006-04-19
06:57:00 UTC (rev 1383)
+++ trunk/main/transit/core/src/main/net/dpml/util/Logger.java 2006-04-19
07:17:38 UTC (rev 1384)
@@ -28,6 +28,12 @@
public interface Logger
{
/**
+ * Return TRUE is trace level logging is enabled.
+ * @return the enabled state of trace logging
+ */
+ boolean isTraceEnabled();
+
+ /**
* Return TRUE is debug level logging is enabled.
* @return the enabled state of debug logging
*/
@@ -52,6 +58,12 @@
boolean isErrorEnabled();

/**
+ * Record a trace level message.
+ * @param message the trace message to record
+ */
+ void trace( String message );
+
+ /**
* Record a debug level message.
* @param message the debug message to record
*/




  • r1384 - in trunk/main: metro/model/src/main/net/dpml/metro/info transit/core/src/main/net/dpml/transit/monitor transit/core/src/main/net/dpml/util, mcconnell at BerliOS, 04/19/2006

Archive powered by MHonArc 2.6.24.

Top of Page