[Bug 278] New: addition of new methods: Logger.debug(String format, Throwable t, Object... arguments)

http://bugzilla.slf4j.org/show_bug.cgi?id=278 Summary: addition of new methods: Logger.debug(String format, Throwable t, Object... arguments) Product: SLF4J Version: 1.6.x Platform: PC OS/Version: Windows NT Status: NEW Severity: minor Priority: P1 Component: Core API AssignedTo: slf4j-dev@qos.ch ReportedBy: kap4020@gmail.com I feel there is a few missing methods in Logger, that which take in a String format, Object arguments, and a Throwable. I understand that the varargs argument needs to be last, but it would be nice to have methods that take in all three: * error(String msg, Throwable t, Object... arguments) * debug(String msg, Throwable t, Object... arguments) * info(String msg, Throwable t, Object... arguments) * warn(String msg, Throwable t, Object... arguments) * trace(String msg, Throwable t, Object... arguments) And a similar set with a Marker argument. Thoughts? -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=278 Karl Pietrzak <kap4020@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kap4020@gmail.com -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=278 Ceki Gulcu <listid@qos.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |listid@qos.ch Resolution| |WONTFIX --- Comment #1 from Ceki Gulcu <listid@qos.ch> 2012-11-02 18:04:31 CET --- Please see http://slf4j.org/faq.html#paramException -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=278 --- Comment #2 from Karl Pietrzak <kap4020@gmail.com> 2012-11-02 18:16:31 CET --- @Ceki Gulcu: That's awesome, thank you! I didn't notice that because it's not in the javadoc (http://www.slf4j.org/api/org/slf4j/Logger.html#info(java.lang.String, java.lang.Object, java.lang.Object)). Is it worth putting in a pull request with updated javadocs? Also, does what if you have two arguments for parametization? i.e., String s = "Hello world"; try { Integer i = Integer.valueOf(s); } catch (NumberFormatException e) { logger.error("Failed to format {} for {}", s, "test", e); } -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=278 --- Comment #3 from Ceki Gulcu <listid@qos.ch> 2012-11-02 18:21:07 CET --- I've never dared try. If my calculations are correct, passing two arguments may create a space-time wormhole. Would you dare try? -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=278 --- Comment #4 from Karl Pietrzak <kap4020@gmail.com> 2012-11-02 18:48:03 CET --- @Ceki Gulcu: logger.info("testing {} and {}", "1", 2, new IllegalStateException("wonderful")); It works! (At least with 1.7.2, not with 1.6.4). -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@qos.ch