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

    How can I log principal for every log4j statement

    Philippe C Newbie

      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"/>

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