configuredColumns.add(CSVSaveService.CSV_ERROR_COUNT); if (saveConfig.saveHostname()) { configuredColumns.add(CSVSaveService.CSV_HOSTNAME);
if (saveConfig.saveHostname()) { field = CSV_HOSTNAME; hostname = parts[i++];
appendFields(saveConfig.saveEncoding(), text, delim, CSV_ENCODING); appendFields(saveConfig.saveSampleCount(), text, delim, CSV_SAMPLE_COUNT, CSV_ERROR_COUNT); appendFields(saveConfig.saveHostname(), text, delim, CSV_HOSTNAME); appendFields(saveConfig.saveIdleTime(), text, delim, CSV_IDLETIME); appendFields(saveConfig.saveConnectTime(), text, delim, CSV_CONNECT_TIME);
if (save.saveHostname()){ writer.addAttribute(ATT_HOSTNAME, event.getHostname());
/** {@inheritDoc} */ @Override public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext context) { super.marshal(obj, writer, context); // Save most things SampleSaveConfiguration prop = (SampleSaveConfiguration) obj; // Save the new fields - but only if they are true // This list MUST agree with the list in MyWrapper#shouldSerializeMember() createNode(writer,prop.saveBytes(),NODE_BYTES); createNode(writer,prop.saveSentBytes(),NODE_SENT_BYTES); createNode(writer,prop.saveUrl(),NODE_URL); createNode(writer,prop.saveFileName(),NODE_FILENAME); createNode(writer,prop.saveHostname(),NODE_HOSTNAME); createNode(writer,prop.saveThreadCounts(),NODE_THREAD_COUNT); createNode(writer,prop.saveSampleCount(),NODE_SAMPLE_COUNT); createNode(writer,prop.saveIdleTime(),NODE_IDLE_TIME); createNode(writer, prop.saveConnectTime(), NODE_CONNECT_TIME); }
if (saveConfig.saveHostname()) { text.append(event.getHostname());