For the moment, you can only use predefined patternLayout here http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html An evolution could be to add a system to define our own layout basically a custom layout could be --------------------------------------------------------- public class MyPidLayout implements CustomConversionLayout{ char getConversionCharacter(){ return 'y'; } String getConversionValue(){ return properties.getProperty("Pid")); } } ---------------------------------------------------------- André Bergues
Please look at EnhancedPatternLayout in the extras companion. That is a back port of the PatternLayout from the abandoned log4j 1.3 development and supports user supplied conversion patterns and see if it does what you are wanting to do. If not, please describe what you want to do more concretely.
Marking as fixed as I believe EnhancedPatternLayout addresses this issue.