StringBuilder (Object type, CharSequence... args) { StringBuilder out = new StringBuilder(); out.append(PREFIX); out.append(Thread.currentThread().getId()); out.append('-'); out.append(type); if (args != null) { for (int i = 0; i < args.length; i += 2) { out.append(SEPARATOR); out.append(args[i]); out.append('='); appendReplacingNewLines(out, args[i + 1]); } } return out; }