RFR: 6594697 - varargs message and Throwable methods for java.util.Logger (original) (raw)
Jim Gish jim.gish at oracle.com
Tue Oct 30 14:21:01 UTC 2012
- Previous message: RFR: 6594697 - varargs message and Throwable methods for java.util.Logger
- Next message: RFR: 6594697 - varargs message and Throwable methods for java.util.Logger
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I was one the fence with the parameter ordering and would like additional feedback on this point. I started off as you suggested, but didn't like the fact that the params were separated from the msg by the Throwable. I could go either way, but would like to hear from others on this point.
Thanks, Jim On 10/30/2012 07:24 AM, Sandeep Shrivastava wrote:
Jim, Thanks for using the isLoggable() method that will go a long way in improving the code of existing sub classes of the Logger. I have a question about the argument list to the new log methods. *public void log(Level level, Throwable thrown, String msg, Object... params) * Could we not have the signature as *public void log(Level level, String msg, Throwable thrown, Object... params)* ** We already have a method in which the Throwable is after the msg param public void log(Level level, String msg, Throwable thrown) So this will keep it consistent. Thanks Sandeep *From:*Jim Gish Sent: Monday, October 29, 2012 4:33 PM To: core-libs-dev Cc: Rajendra Inamdar; Sandeep Shrivastava Subject: RFR: 6594697 - varargs message and Throwable methods for java.util.Logger Please review http://cr.openjdk.java.net/~jgish/Bug6594697-AddLogThrowable/ <http://cr.openjdk.java.net/%7Ejgish/Bug6594697-AddLogThrowable/> This change adds three new methods to Logger that provide a Throwable along with a varags Object list as parameters to the log message. In addition, it makes a small refactoring change to the existing log message to better enable sub-classing of Logger. Thanks, Jim -- Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304 Oracle Java Platform Group | Core Libraries Team 35 Network Drive Burlington, MA 01803 jim.gish at oracle.com <mailto:jim.gish at oracle.com>
-- Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304 Oracle Java Platform Group | Core Libraries Team 35 Network Drive Burlington, MA 01803 jim.gish at oracle.com
- Previous message: RFR: 6594697 - varargs message and Throwable methods for java.util.Logger
- Next message: RFR: 6594697 - varargs message and Throwable methods for java.util.Logger
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]