Changeset 1577
- Timestamp:
- 12/07/09 15:44:44 (2 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 modified
-
config/build-test.xml (modified) (2 diffs)
-
src/java/org/jcoderz/commons/LogFormatter.java (modified) (1 diff)
-
src/java/org/jcoderz/commons/LogThreadContext.java (added)
-
src/java/org/jcoderz/commons/LoggableImpl.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/config/build-test.xml
r1356 r1577 212 212 depends="test-compile, instrument, test-single-local-nodeps" 213 213 description="Run a single JUnit test suite"/> 214 <target name="test-single-local-nodeps" if="testcase , junit.present">214 <target name="test-single-local-nodeps" if="testcase"> 215 215 <mkdir dir="${build.dir}/report/junit"/> 216 216 <junit printsummary="yes" haltonfailure="no" … … 221 221 <sysproperty key="basedir" value="${base.dir}"/> 222 222 <sysproperty key="java.util.logging.config.file" 223 value="${base.dir}/src/etc/fawkez-logging.properties"/>223 file="${base.dir}/src/etc/fawkez-logging.properties"/> 224 224 <sysproperty key="org.xml.sax.driver" 225 225 value="org.apache.xerces.parsers.SAXParser"/> -
trunk/src/java/org/jcoderz/commons/LogFormatter.java
r1535 r1577 121 121 * @param sb the StringBuffer where to append the formatted log record 122 122 * @param record the log record to format 123 * @param trackingIdSequence a list collecti ong all tracking ids of messages123 * @param trackingIdSequence a list collecting all tracking ids of messages 124 124 * being formatted by one call. 125 125 */ -
trunk/src/java/org/jcoderz/commons/LoggableImpl.java
r1535 r1577 46 46 import java.util.Random; 47 47 import java.util.Set; 48 import java.util.Map.Entry; 48 49 import java.util.logging.Logger; 49 50 … … 126 127 public static final String GROUP_NAME_PARAMETER_NAME = "_GROUP"; 127 128 129 /** Context parameter values prefix. */ 130 public static final String CONTEXT_PARAMETER_PREFIX = "CTX~"; 131 128 132 /** This nodes id. */ 129 133 public static final String NODE_ID = getStaticNodeId(); … … 256 260 mOuter = outer; 257 261 initInternalParameters(); 262 initThreadContextParameters(); 258 263 } 259 264 … … 301 306 initCause(cause); 302 307 initInternalParameters(); 308 initThreadContextParameters(); 303 309 } 304 310 … … 513 519 } 514 520 521 private final void initThreadContextParameters () 522 { 523 final Iterator i = LogThreadContext.get().entrySet().iterator(); 524 while (i.hasNext()) 525 { 526 final Entry entry = (Entry) i.next(); 527 addParameter( 528 CONTEXT_PARAMETER_PREFIX + entry.getKey(), 529 String.valueOf(entry.getValue())); 530 } 531 } 532 515 533 private final void getSource () 516 534 {
