Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0-beta3
-
None
-
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: C:\Java\apache-maven-3.0.4\bin\..
Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_35\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500) Maven home: C:\Java\apache-maven-3.0.4\bin\.. Java version: 1.6.0_35, vendor: Sun Microsystems Inc. Java home: C:\Program Files\Java\jdk1.6.0_35\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Description
My goal here is to be able to say:
Logger log = LogManager.getLogger(Foo.class, new MyMessageFactory())
Where MyMessageFactory extends a MessageFactory:
and overrides:
public Message newMessage(String message, Object... params)
{ return new ParameterizedMessage(message, params); }as:
public Message newMessage(String message, Object... params)
{ return new StringFormattedMessage(message, params); }which would let me use native Java formatting instead of {} formatting /easily/
I've attach the idea as the beginning of patch, which is missing the LogManager bits.
Maybe we need a sub-interface of Message for param message, which would make me want to rename the class ParameterizedMessage to SimpleParameterizedMessage.