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/xml/app-info-test.xml

    r1011 r1610  
    2323        </description> 
    2424      </message> 
     25      <message id="4" name="IMPLIED_PARAMETERS" 
     26        level="INFO" 
     27        base-exception="org.jcoderz.commons.test.TestServiceRuntimeException"> 
     28        <text>This error has the id {:_TRACKING_NUMBER} occured on 
     29          Thread {:_THREAD_ID} named {:_THREAD_NAME}. Please note that the 
     30        nested exception was {:_CAUSE}.</text> 
     31        <description> 
     32          Not real fun! 
     33        </description> 
     34      </message> 
     35      <message id="5" name="IMPLIED_PARAMETERS_LOG" 
     36        level="INFO"> 
     37        <text>This error has the id {:_TRACKING_NUMBER} occured on 
     38          Thread {:_THREAD_ID} named {:_THREAD_NAME}. Please note that the 
     39        nested exception was {:_CAUSE}.</text> 
     40        <description> 
     41          Not real fun! 
     42        </description> 
     43      </message> 
     44      <message id="6" name="IMPLIED_PARAMETERS2" 
     45        level="INFO" 
     46        base-exception="org.jcoderz.commons.test.TestServiceRuntimeException"> 
     47        <text>{TEST} This error has the id {:_TRACKING_NUMBER} occured on 
     48          Thread {:_THREAD_ID} named {:_THREAD_NAME}. Please note that the 
     49        nested exception was {:_CAUSE}.</text> 
     50        <description> 
     51          Not real fun! 
     52        </description> 
     53      </message> 
     54      <message id="7" name="IMPLIED_PARAMETERS_LOG2" 
     55        level="INFO"> 
     56        <text>{TEST} This error has the id {:_TRACKING_NUMBER} occured on 
     57          Thread {:_THREAD_ID} named {:_THREAD_NAME}. Please note that the 
     58        nested exception was {:_CAUSE}.</text> 
     59        <description> 
     60          Not real fun! 
     61        </description> 
     62      </message> 
     63      <message id="8" name="IMPLIED_PARAMETERS3" 
     64        level="INFO" 
     65        base-exception="org.jcoderz.commons.test.TestServiceRuntimeException"> 
     66        <text>This error has the id {:_TRACKING_NUMBER} occured on 
     67          Thread {:_THREAD_ID} named {:_THREAD_NAME}. Please note that the 
     68        nested exception was {:_CAUSE}. {TEST}</text> 
     69        <description> 
     70          Not real fun! 
     71        </description> 
     72      </message> 
     73      <message id="9" name="IMPLIED_PARAMETERS_LOG3" 
     74        level="INFO"> 
     75        <text>This error has the id {:_TRACKING_NUMBER} occured on 
     76          Thread {:_THREAD_ID} named {:_THREAD_NAME}. Please note that the 
     77        nested exception was {:_CAUSE}.{TEST}</text> 
     78        <description> 
     79          Not real fun! 
     80        </description> 
     81      </message> 
    2582    </group> 
    2683  </application>