Hazmes
(Hazmes)
January 5, 2018, 12:03pm
1
Hi,
I am currently sending Log Data to Graylog via NXlog. Some log Messages have leading Whitespaces. When I look these messages up, the whitespace is gone.
Does Graylog or NXlog ignore leading whitespace or both?
Can I change this somehow?
Currently Using 2.3.2, Tegernseer if it is important.
Thanks.
jochen
(Jochen)
January 5, 2018, 12:18pm
2
Graylog trims the received messages (i. e. removes leading and trailing whitespace characters).
LOG.debug("Ignoring invalid or reserved key {} for message {}", trimmedKey, getId());
}
return;
}
if (FIELD_TIMESTAMP.equals(trimmedKey) && value != null && value instanceof Date) {
final DateTime timestamp = new DateTime(value);
final Object previousValue = fields.put(FIELD_TIMESTAMP, timestamp);
updateSize(trimmedKey, timestamp, previousValue);
} else if (value instanceof String) {
final String str = ((String) value).trim();
if (isRequiredField || !str.isEmpty()) {
final Object previousValue = fields.put(trimmedKey, str);
updateSize(trimmedKey, str, previousValue);
}
} else if (value != null) {
final Object previousValue = fields.put(trimmedKey, value);
updateSize(trimmedKey, value, previousValue);
}
}
No, that’s currently not possible.
Feel free to create a feature request at Issues · Graylog2/graylog2-server · GitHub
system
(system)
Closed
January 19, 2018, 12:19pm
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.