fix uninitialized field error
This commit is contained in:
@@ -48,13 +48,14 @@ function gelfAppender (layout, host, port, hostname, facility) {
|
|||||||
host = host || 'localhost';
|
host = host || 'localhost';
|
||||||
port = port || 12201;
|
port = port || 12201;
|
||||||
hostname = hostname || require('os').hostname();
|
hostname = hostname || require('os').hostname();
|
||||||
if(facility) {
|
|
||||||
customFields['_facility'] = facility;
|
|
||||||
}
|
|
||||||
layout = layout || layouts.messagePassThroughLayout;
|
layout = layout || layouts.messagePassThroughLayout;
|
||||||
|
|
||||||
var defaultCustomFields = customFields || {};
|
var defaultCustomFields = customFields || {};
|
||||||
|
|
||||||
|
if(facility) {
|
||||||
|
defaultCustomFields['_facility'] = facility;
|
||||||
|
}
|
||||||
|
|
||||||
var client = dgram.createSocket("udp4");
|
var client = dgram.createSocket("udp4");
|
||||||
|
|
||||||
process.on('exit', function() {
|
process.on('exit', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user