Skip to content

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

Description

@erkansivas35

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions