3 Replies Latest reply on Apr 17, 2004 8:18 PM by starksm64

    How can I log principal for every log4j statement

    philc

      I want to see who does what in the logs. Is there a simple way to add more values available in the conversion pattern?

       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %u %-5p [%c] %m%n"/>
       </layout>
      


      %u would print out the username (principal)
      Is there a simple way to do this? Maybe use the MDC?