logdna / logdna-winston

LogDNA's Node.js logging module with support for Winston
MIT License
16 stars 14 forks source link

TypeError: transport is not a constructor #2

Closed bonesoul closed 6 years ago

bonesoul commented 6 years ago
const logdna = require('logdna-winston'); // eslint-disable-line no-unused-vars
const winston = require('winston');

    winston.add(winston.transports.Logdna, {
      app: `${config.get('logging.logdna.app')}-${processName}`,
      key: config.get('logging.logdna.key')
    });

any ideas?

obirije commented 6 years ago

same issue here

Yurickh commented 6 years ago

I've managed to workaround this issue by using:

const winston = require('winston')
const { WinstonTransport } = require('logdna-winston') 

winston.add(WinstonTransport, { ... })
markhealey commented 6 years ago

This doesn't work with @winstonjs 3 (currently 3.0.0-rc5).

Invalid transport, must be an object with a log method.
TomerCohavi commented 5 years ago

Same issue here. winston 3.1.0 transport is not a constructor