cannot add loggly transport to the newest winston
Opened this issue · 1 comments
piotr-s-brainhub commented
Node: 8.6.0
npm: 5.2.0
OS: Mac OS X 10.12.6
winston: 3.0.0-rc1
winston-loggly: 1.3.1
I'm trying to use winston-loggly
as in the README.md
and it doesn't work.
const winston = require('winston');
require('winston-loggly');
const options = {
inputToken: process.env.LOGGLY_TOKEN,
subdomain: process.env.LOGGLY_ORG,
};
winston.add(winston.transports.Loggly, options);
I obtain:
/Users/foo/programming/my-logger/node_modules/winston-transport/legacy.js:17
throw new Error('Invalid transport, must be an object with a log method.');
^
Error: Invalid transport, must be an object with a log method.
at new LegacyTransportStream (/Users/foo/programming/my-logger/node_modules/winston-transport/legacy.js:17:11)
at DerivedLogger.add (/Users/foo/programming/my-logger/node_modules/winston/lib/winston/logger.js:277:7)
at Object.winston.(anonymous function) [as add] (/Users/foo/programming/my-logger/node_modules/winston/lib/winston.js:84:34)
at Object.<anonymous> (/Users/foo/programming/my-logger/1.js:8:9)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
piotr-s-brainhub commented
Fixed in #53