Show
Ignore:
Timestamp:
03/11/10 08:19:11 (2 years ago)
Author:
amandel
Message:

Implemented #78.
If a variable used in a message starts with a colon (:) and no type definition, the parameter is assumed to be already set. This gives access to implied parameters of the log message, such as _THREAD_ID or _CAUSE and also to the parameters that are bound to the thread context.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/test/java/org/jcoderz/commons/LogFormatterOutputTest.java

    r1011 r1610  
    3636import java.util.logging.Logger; 
    3737import junit.framework.TestCase; 
     38 
     39import org.jcoderz.commons.test.TssLogMessage; 
    3840import org.jcoderz.commons.types.Date; 
    3941import org.xml.sax.SAXException; 
     
    6062   { 
    6163      TstLogMessage.TestMessage.log("foo", Date.now().toUtilDate()); 
     64   } 
     65 
     66   /** 
     67    * Produces a log message from an exception w/ two parameters. 
     68    */ 
     69   public void testLogEventWithImpliedParams () 
     70   { 
     71      TssLogMessage.ImpliedParametersLog.log(new RuntimeException("Foo!")); 
    6272   } 
    6373