smartive / graylog-ts

Provides a class for logging with graylog. Written in TypeScript
MIT License
1 stars 0 forks source link

Uncaught Error: Cannot find module "dgram" #3

Open SebLevDev opened 7 years ago

SebLevDev commented 7 years ago

Hi,

I try to use this to log in my server Graylog from an Ionic2/Agnular2 app on Android. But i have this error on load Uncaught Error: Cannot find module "dgram"

providers/graylog-service.js

import { Graylog, GraylogConfig  } from 'graylog-ts';
import { Injectable } from '@angular/core';

@Injectable()
export class GraylogService {
    private graylog: Graylog;

    constructor() {
            let servers: any = [{ host: "graylog.example.com", port: 9022 }];
            this.graylog = new Graylog({ servers: servers, hostname: "graylog.example.com" });
    }
}

I have do this npm install dgram --save but the problem persist

An idea ?