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:
@@ -96,8 +96,7 @@ function gelfAppender (layout, host, port, hostname, facility) {
|
|||||||
function preparePacket(loggingEvent) {
|
function preparePacket(loggingEvent) {
|
||||||
var msg = {};
|
var msg = {};
|
||||||
addCustomFields(loggingEvent, msg);
|
addCustomFields(loggingEvent, msg);
|
||||||
msg.full_message = layout(loggingEvent);
|
msg.short_message = layout(loggingEvent);
|
||||||
msg.short_message = msg.full_message;
|
|
||||||
|
|
||||||
msg.version="1.0";
|
msg.version="1.0";
|
||||||
msg.timestamp = msg.timestamp || new Date().getTime() / 1000; // log should use millisecond
|
msg.timestamp = msg.timestamp || new Date().getTime() / 1000; // log should use millisecond
|
||||||
|
|||||||
Reference in New Issue
Block a user