2008/9/16 raulvk.soa <[EMAIL PROTECTED]>: > > Yep, I just realised that was possible. > > Do you know if there is a way to get rid of the full category name and only > print out the last token on the log file? i.e. print out > "ValidatingAgainstXMLSchema" instead of > "com.mycompany.ValidatingAgainstXMLSchema". > > I am aware that I can truncate it at a fixed position, but I cannot > guarantee that my final tokens will all be the same length...
Using this config tends to just print the last path of the category log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n For more information see http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html i.e. use %c{x} where x is the number of right hand paths to print, so %c{1} just prints the last one -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com