} else {
buf.append("-");
}
buf.append(" ");
if (isStructured || includeMDC) {
StructuredDataId id = null;
String text;
if (isStructured) {
final StructuredDataMessage data = (StructuredDataMessage) msg;
final Map<String, String> map = data.getData();
id = data.getId();
formatStructuredElement(id, eventPrefix, map, buf, noopChecker);
text = data.getFormat();
} else {
text = msg.getFormattedMessage();
}
if (includeMDC) {
Map<String, String> map = event.getContextMap();
if (mdcRequired != null) {
checkRequired(map);
}
final int ein = id == null || id.getEnterpriseNumber() < 0 ?
enterpriseNumber : id.getEnterpriseNumber();
final StructuredDataId mdcSDID = new StructuredDataId(mdcId, ein, null, null);
if (fieldFormatters != null) {
map = new HashMap<String, String>(map);
for (final Map.Entry<String, List<PatternFormatter>> entry : fieldFormatters.entrySet()) {
final StringBuilder value = new StringBuilder();
for (final PatternFormatter formatter : entry.getValue()) {