logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45941] New: Custom PatternLayout
Date Fri, 03 Oct 2008 09:58:05 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45941

           Summary: Custom PatternLayout
           Product: Log4j
           Version: unspecified
          Platform: PC
               URL: http://logging.apache.org/log4j/1.2/apidocs/org/apache/l
                    og4j/PatternLayout.html
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Layout
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: spamadore@gmail.com


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


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message