GELF time precision should be millisecond level

This commit is contained in:
Karl Lam 2013-09-16 18:31:23 +08:00
parent 731e217505
commit b9bba00d8c

View File

@ -100,7 +100,7 @@ function gelfAppender (layout, host, port, hostname, facility) {
msg.short_message = msg.full_message; msg.short_message = msg.full_message;
msg.version="1.0"; msg.version="1.0";
msg.timestamp = msg.timestamp || new Date().getTime() / 1000 >> 0; msg.timestamp = msg.timestamp || new Date().getTime() / 1000; // log should use millisecond
msg.host = hostname; msg.host = hostname;
msg.level = levelMapping[loggingEvent.level || levels.DEBUG]; msg.level = levelMapping[loggingEvent.level || levels.DEBUG];
msg.facility = facility; msg.facility = facility;