String (final String messageName, final Map attributes) { String text = "##teamcity[" + messageName; for (Iterator iterator = attributes.keySet().iterator(); iterator.hasNext(); ) { final Object attrName = iterator.next(); text += " " + attrName + "='" + escapeStr((String)attributes.get(attrName), STD_ESCAPER) + "'"; } text += "]"; return text; }