GELF appender: don't send full_message field

According to the GELF spec v1.1 [1], the full_message field in GELF is
optional. The log4js implemention until now has sent identitical
short_message and full_message fields. Since this does not add any new
information to the log message, I suggest that full_message be dropped
from GELF.

--
[1] http://graylog2.org/gelf#specs
This commit is contained in:
Jens John
2014-07-10 12:17:35 +09:00
parent f44af56f9e
commit ca635fc4b9

View File

@@ -96,8 +96,7 @@ function gelfAppender (layout, host, port, hostname, facility) {
function preparePacket(loggingEvent) {
var msg = {};
addCustomFields(loggingEvent, msg);
msg.full_message = layout(loggingEvent);
msg.short_message = msg.full_message;
msg.short_message = layout(loggingEvent);
msg.version="1.0";
msg.timestamp = msg.timestamp || new Date().getTime() / 1000; // log should use millisecond