From 04dfafe19f0d3687d0f0b3e51d2d5bf3d19b58bf Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Wed, 07 Mar 2007 23:38:55 +0000
Subject: [PATCH] Enable AspectJ weaving for the new debug logging framework: - This commit does not allow for configuring the debug logger over protocol. It can only be configured on server startup using properties. - The settings specified during startup will remain in effect for the duration of the server. - All messages are printed to standard out. - Weaving could be turned off with the -DDEBUG_BUILD=false property when building the server. - By default, the debug logger is off on server startup. It could be enabled by using the -Dorg.opends.server.debug.enabled=true. - Debug targets may be defined with the -Dorg.opends.server.debug.target property. The syntax of this property can be found on the opends.dev.java.net documentation section. - Debug logging is turned on by default on unit tests and printed on test failure.  - Default debug target for unit tests could be changed by using the -Dorg.opends.test.debug.target property.

---
 opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java b/opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java
index ae94b4f..69ce418 100644
--- a/opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java
+++ b/opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java
@@ -34,6 +34,7 @@
 import org.opends.server.types.DebugLogCategory;
 
 import java.util.Date;
+import java.util.Map;
 
 /**
  * A DebugLogRecord is reponsible for passing tracing log messages from the
@@ -69,6 +70,11 @@
   private long threadID;
 
   /**
+   * Detailed debug properties for thread that issued logging call.
+   */
+  private Map<String, String> threadProperties;
+
+  /**
    * Event time in milliseconds since 1970.
    */
   private Date timestamp;
@@ -387,4 +393,24 @@
   public void setSequenceNumber(long seq) {
     sequenceNumber = seq;
   }
+
+  /**
+   * Set the thread properties.
+   *
+   * @param threadProperties the thread properties map to set.
+   */
+  public void setThreadProperties(Map<String, String> threadProperties)
+  {
+    this.threadProperties = threadProperties;
+  }
+
+  /**
+   * Retrives the thread properties.
+   *
+   * @return the thread properties.
+   */
+  public Map<String, String> getThreadProperties()
+  {
+    return threadProperties;
+  }
 }

--
Gitblit v1.10.0