Review request for 6381464: "SimpleFormatter should use one single line format"
Alan.Bateman at oracle.com
Sun Mar 27 19:09:43 UTC 2011
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
> You can specify the format string using the java.util.Formatter syntax in
> a new property: "java.util.logging.SimpleFormatter" that you can
> your own output format. See the javadoc for details:
> Webrev at:
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
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.
More information about the core-libs-dev