Wizcorp / node-graylog2

Graylog2 client library for Node.js
Other
59 stars 36 forks source link

Uncaught TypeError: dgram.createSocket is not a function #49

Open erkansivas35 opened 3 years ago

erkansivas35 commented 3 years ago

I get this error. I use this library in vuejs.

Screen Shot 2021-04-01 at 13 00 25
// Main.js
const graylog2 = require("graylog2");
const logger = new graylog2.graylog({
  servers: [
    { 'host': {myHost}', port: {myPort} }
  ],
  hostname: 'myProjectName', // the name of this host
  // (optional, default: os.hostname())
  facility: 'Node.js',     // the facility for these log messages
  // (optional, default: "Node.js")
  bufferSize: 1400         // max UDP packet size, should never exceed the
  // MTU of your system (optional, default: 1400)
});

logger.on('error', function (error) {
  console.error('Error while trying to write to graylog2:', error);
});

logger.log("Graylog test");

Can you help me solve the problem?

denwist commented 2 years ago

Hello! Faced a similar issue https://github.com/Wizcorp/node-graylog2/issues/50 How did you solve it?

erkansivas35 commented 2 years ago

Hello! Faced a similar issue #50 How did you solve it?

Hello! I couldn't solve it.

denwist commented 2 years ago

Hello! Faced a similar issue #50 How did you solve it?

Hello! I couldn't solve it.

It is a pity that this module cannot be used yet due to errors.