mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
Merge pull request #395 from dcolens/dcolens-patch-1
Fixes #393 - catch error when sending UDP packet to GELF server
This commit is contained in:
commit
defeb2503b
@ -114,9 +114,9 @@ function gelfAppender (layout, host, port, hostname, facility) {
|
||||
}
|
||||
|
||||
function sendPacket(packet) {
|
||||
try {
|
||||
client.send(packet, 0, packet.length, port, host);
|
||||
} catch(e) {}
|
||||
client.send(packet, 0, packet.length, port, host, function(err) {
|
||||
if (err) { console.error(err); }
|
||||
});
|
||||
}
|
||||
|
||||
return function(loggingEvent) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user