
http://bugzilla.slf4j.org/show_bug.cgi?id=221 Summary: MessageFormatter.format() not returning String Product: SLF4J Version: 1.6.x Platform: PC OS/Version: Windows NT Status: NEW Severity: major Priority: P1 Component: Core API AssignedTo: slf4j-dev@qos.ch ReportedBy: lorant.pinter@gmail.com The MessageFormatter.format() method, according to its Javadoc, is supposed to return a String, but it doesn't. Instead it returns a FormattingTuple for some time. I have this piece of code: private void trace(String message, Object... args) { if (log.isTraceEnabled(MARKER)) { StringBuilder line = new StringBuilder(); line.append(Transaction.this); final int holdCount = lock.getHoldCount(); line.append("(lvl ").append(holdCount).append(")"); for (int i = 0; i < holdCount; i++) { line.append('\t'); } line.append(" - "); // **** Important bit here ***** line.append(MessageFormatter.format(message, args)); log.trace(MARKER, line.toString()); } } It used to work while MessageFormat.format() still returned a String before 1.6.0. Now it's printing something like this: TRACE 56|242|c2 Transaction[0](lvl 2) org.slf4j.helpers.FormattingTuple@74dc6ad7 Now, that's not very helpful. Please change the Javadoc to reflect that the returned value is not a string. Please consider adding a .toString() method to FormattingTuple as well. -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.