You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/10/03 11:58:05 UTC
DO NOT REPLY [Bug 45941] New: Custom PatternLayout
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
DO NOT REPLY [Bug 45941] Custom PatternLayout
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45941
Curt Arnold <ca...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Curt Arnold <ca...@apache.org> 2008-10-03 06:15:52 PST ---
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.
--
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
DO NOT REPLY [Bug 45941] Custom PatternLayout
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45941
Curt Arnold <ca...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
--- Comment #2 from Curt Arnold <ca...@apache.org> 2009-01-08 09:11:53 PST ---
Marking as fixed as I believe EnhancedPatternLayout addresses this issue.
--
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