Mandy Chung wrote:
6381464: SimpleFormatter should use one single line format
This is a follow-up of the review for 7006814. I came up with a better
solution that allows a user to customize the output format for
SimpleFormatter.
You can specify the format string using the java.util.Formatter syntax in
a new property: "java.util.logging.SimpleFormatter" that you can
customize
your own output format. See the javadoc for details:
http://cr.openjdk.java.net/~mchung/jdk7/6381464/api/java/util/logging/SimpleFormatter.html
Webrev at:
http://cr.openjdk.java.net/~mchung/jdk7/6381464/webrev.00/
It definitely make sense to do this in conjunction with 7006814. I've
gone through the webrev and it mostly looks good to me. A couple of
small comments:
SimpleFormatter L144-146, you could use a StringBuilder to build it up
when the source file is known.
SimpleFormatter L156, I assume this should be %n rather than \n. Same
thing in PlatformLogger.
SimpleFormatter L161, this pre-dates your changes but I don't see why it
catch Exception here. Same thing in PlatformLogger.
In logging.properties it might be good to extend the comment to mention
that the example generate one-line log messages.
The new test has a copyright date of 2010, I assume this should be 2011.
In the test would it be better to use a temporary file rather than a
file in the working directory.
-Alan.